API for authenticate/deauthenticate (#151)
* Creating the authentication API.
This commit is contained in:
1 parent
d8f11af4d7
commit
08e9a027fa
7 files changed
+1274
-64
No files matched your search
@@ -2120,9 +2120,117 @@
|
||||
"controller.api.services.v1.UserService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/orgs/{org_id}:authenticate": {
|
||||
"post": {
|
||||
"summary": "Authenticate a user to an Organization and retrieve an authentication token.",
|
||||
"operationId": "OrganizationService_Authenticate",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.resources.authtokens.v1.AuthToken"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.services.v1.AuthenticateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.OrganizationService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/orgs/{org_id}:deauthenticate": {
|
||||
"post": {
|
||||
"summary": "Deauthenticate an authentication token from an Organization.",
|
||||
"operationId": "OrganizationService_Deauthenticate",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.services.v1.DeauthenticateResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "org_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.OrganizationService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"controller.api.resources.authtokens.v1.AuthToken": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the AuthToken\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"token": {
|
||||
"type": "string",
|
||||
"description": "The token. This will only be populated after login and is only ever visible to the end user whose login\nrequest resulted in this auth token being created.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the user of this AuthToken.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"auth_method_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the user of this AuthToken.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"created_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time this resource was created\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"updated_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time this resource was last updated.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"approximate_last_used_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The approximate time this AuthToken was last used.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"expiration_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time this AuthToken expires.\nOutput only.",
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
"title": "AuthToken contains all fields related to an AuthToken resource"
|
||||
},
|
||||
"controller.api.resources.groups.v1.Group": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2443,6 +2551,33 @@
|
||||
"controller.api.services.v1.AddToHostSetResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"controller.api.services.v1.AuthenticateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"org_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"auth_method_id": {
|
||||
"type": "string",
|
||||
"description": "The id to the authmethod in the system being used for authentication. The auth method must be in the org\nbeing logged in to."
|
||||
},
|
||||
"token_type": {
|
||||
"type": "string",
|
||||
"description": "This can be \"cookie\" or \"token\". If not provided, \"token\" will be used. For now only type \"token\" is returned."
|
||||
},
|
||||
"password_credential": {
|
||||
"$ref": "#/definitions/controller.api.services.v1.PasswordCredential"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.AuthenticateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"$ref": "#/definitions/controller.api.resources.authtokens.v1.AuthToken"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.CreateGroupResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2520,6 +2655,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.DeauthenticateResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"controller.api.services.v1.DeleteGroupResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2735,6 +2873,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.PasswordCredential": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"login_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.RemoveFromHostSetResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user