{% include navmenu.html %} This is beyond the scope of the workshop. The following notes may be helpful in configuring your environment. An export of preconfigured envs to work with the official demo and a collection of useful requests, more than the ones used in the tutorial, are available for download
- Env Official DSpace 7 Demo - Anonymous user
- Env Official DSpace 7 Demo - Administrator user
- Env Official DSpace 7 Demo - Submitter user
- Request collection
- Click "Edit" on the Collection
Customize the server address, username, and password for your site.
const loginRequest = {
url: pm.environment.get('dspaceresturl') + "/api/authn/login",
method: 'POST',
header: 'Content-Type: application/x-www-form-urlencoded',
body: "user="+pm.environment.get('dspaceuser')+"&password="+pm.environment.get('dspacepwd')
};
pm.sendRequest(loginRequest, function (err, response) {
var s = response.headers.get("Authorization");
if (s == null) {
s = "";
} else {
s = s.replace(/Bearer /,"");
}
pm.environment.set("auth_token", s);
});
Create one or more environments with the following variables
- dspaceresturl: http://localhost:8080/spring-rest
- dspaceuser: dspacedemo%2Badmin@gmail.com
- dspacepwd: dspace
Please note that the dspaceuser and dspacepwd must be URLEncoded (i.e. + become %2B). To setup an env for anonymous user simple keep the dspaceuser and dspacepwd empty
- Type:
Bearer Token
- Token:
{% raw %}{{auth_token}}{% endraw %}
Set Authorization to "Inherit from Parent" {% include nav.html %}