Skip to content

Commit

Permalink
Update Documentation to represent current API behavior (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
weberjm committed Nov 1, 2020
1 parent 8ae31f8 commit ee1a8e6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/iam/README.md
Expand Up @@ -164,7 +164,7 @@ POST: /login (see open api docs)

POST /api/v1/tokens (see open api docs)

_If you want to create a permanent token, pass the "tokenLifeSpan" of -1_
_If you want to create a permanent token, pass an "expiresIn" value of -1_

#### Introspect a token

Expand Down
42 changes: 41 additions & 1 deletion services/iam/doc/openapi.json
Expand Up @@ -780,7 +780,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
"$ref": "#/components/schemas/TokenCreate"
}
}
}
Expand Down Expand Up @@ -955,6 +955,46 @@
}
}
},
"TokenCreate": {
"type": "object",
"properties": {
"inquirer": {
"type": "string",
"description": "Id of user or a service running on behalf of the user. Who wants the token to be created.",
"required": true
},
"initiator": {
"type": "string",
"description": "user or a a service who initiated this token request. Who is requesting the token creation (must have the permission to create a token). Defaults to requester id."
},
"accountId": {
"type": "string",
"description": "Affected account the token is created for",
"required": true
},
"token": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"EPHEMERAL_SERVICE_ACCOUNT",
"PERSISTENT",
"SELF"
]
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Permissions"
}
},
"expiresIn": {
"type": "string",
"description": "Sets the lifespan of the token. Possible values are -1 for permanent token and a string expression describing a time span, e.g. 2m, 5h"
}
}
},
"Login": {
"title": "Login data",
"type": "object",
Expand Down

0 comments on commit ee1a8e6

Please sign in to comment.