Skip to content

Commit e1fcabb

Browse files
committed
fix markdown formatting
1 parent 7316ee7 commit e1fcabb

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

authentication.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,12 @@ When clicking on a link to download a protected file in the UI no authentication
177177

178178
The token follows the "JSON Web Token structure", same as the login tokens.
179179

180-
```
180+
```
181181
curl -v -X POST https://{dspace-server.url}/api/authn/shortlivedtokens -H "Authorization: Bearer eyJhbG...COdbo" -H "X-XSRF-TOKEN: {csrf-token}"
182-
```
183-
184-
```json
182+
```
183+
184+
This will return the token, E.G.:
185+
```json
185186
{
186187
"token": "eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiJjZDgyNGE2MS05NWJlLTRlMTYtYmNjZC01MWZlYTI2NzA3ZDAiLCJzZyI6W10sImV4cCI6MTU5MDQxMzUwNn0.XRK4ldh9l4My45gJzLtcW97hVUpbtM5oAQsxuQ2V37c",
187188
"_links": {
@@ -205,11 +206,12 @@ This endpoint can provide a machine token, a long lived machine token that can b
205206

206207
The token follows the "JSON Web Token structure", same as the login tokens.
207208

208-
```
209+
```
209210
curl -v -X POST https://{dspace-server.url}/api/authn/machinetokens -H "Authorization: Bearer eyJhbG...COdbo" -H "X-XSRF-TOKEN: {csrf-token}"
210-
```
211+
```
211212

212-
```json
213+
This will return the token, E.G.:
214+
```json
213215
{
214216
"token": "eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiJjZDgyNGE2MS05NWJlLTRlMTYtYmNjZC01MWZlYTI2NzA3ZDAiLCJzZyI6W10sImV4cCI6MTU5MDQxMzUwNn0.XRK4ldh9l4My45gJzLtcW97hVUpbtM5oAQsxuQ2V37c",
215217
"type": "machinetoken",
@@ -232,9 +234,9 @@ Return codes
232234

233235
This endpoint invalidate the machine token generated from the current user, if any.
234236

235-
```
237+
```
236238
curl -v -X DELETE https://{dspace-server.url}/api/authn/machinetokens -H "Authorization: Bearer eyJhbG...COdbo" -H "X-XSRF-TOKEN: {csrf-token}"
237-
```
239+
```
238240

239241
Return codes
240242
- 204 No content.

0 commit comments

Comments
 (0)