Skip to content

Latest commit

 

History

History
188 lines (125 loc) · 5.82 KB

auth.md

File metadata and controls

188 lines (125 loc) · 5.82 KB

Auth Actions

Details on the various actions that can be performed on the Auth resource, including the expected parameters and the potential responses.

Contents

Authenticate Device

Authenticates a device using the provided credentials.

result = client.auth.authenticate_device(credentials=my_credentials)

print(result)

Authentication

No api access token is required to call this action.

Available Parameters

Name Type Required Description Default Example
credentials Device Credentials Y Device authentication credentials Device Credentials Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Authenticated Device Successful authentication. The included api access token by default has the scope 'all.Device'.

Error Responses

Code Type Description
400 Error Error if malformed request
401 Error Unauthorized error if authentication fails

Authenticate User

Authenticates a user using the provided credentials.

result = client.auth.authenticate_user(credentials=my_credentials)

print(result)

Authentication

No api access token is required to call this action.

Available Parameters

Name Type Required Description Default Example
credentials User Credentials Y User authentication credentials User Credentials Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Authenticated User Successful authentication. The included api access token has the scope 'all.User'.

Error Responses

Code Type Description
400 Error Error if malformed request
401 Error Unauthorized error if authentication fails

Authenticate User Github

Authenticates a user via GitHub OAuth.

result = client.auth.authenticate_user_github(oauth=my_oauth)

print(result)

Authentication

No api access token is required to call this action.

Available Parameters

Name Type Required Description Default Example
oauth Github Login Y User authentication credentials (access token) Github Login Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Authenticated User Successful authentication. The included api access token has the scope 'all.User'.

Error Responses

Code Type Description
400 Error Error if malformed request
401 Error Unauthorized error if authentication fails

Authenticate User Saml

Authenticates a user via a SAML response.

result = client.auth.authenticate_user_saml(saml=my_saml)

print(result)

Authentication

No api access token is required to call this action.

Available Parameters

Name Type Required Description Default Example
saml SAML Response Y Encoded SAML response from an IDP for a user. SAML Response Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Authenticated User Successful authentication. The included api access token has the scope 'all.User'.

Error Responses

Code Type Description
400 Error Error if malformed request
401 Error Unauthorized error if authentication fails

Sso Domain

Checks email domain for SSO configuration.

result = client.auth.sso_domain(email=my_email)

print(result)

Authentication

No api access token is required to call this action.

Available Parameters

Name Type Required Description Default Example
email string Y The email address associated with the user login example@example.com
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 SSO Request Successful finding SSO for domain. Returns SSO request URL and type.
204 undefined No domain associated with an SSO configuration

Error Responses

Code Type Description
400 Error Error if malformed request