Module: authentication

Copyright 2020 Parsable, Inc
API address: /api/auth

ModuleServicesData typesConstants
authenticationAuthenticationService
AuthTokenMetaResult
IdpAuth
LoginOptions
LoginResult
LoginTeamInfo
PasswordAuth
SSOProvider
SSORequest
TeamInfo
TeamSelectResult
ValidAuthTypes
WebSSOAuth

Enumerations

Enumeration: SSOProvider


OKTA1

Data structures

Struct: TeamInfo

KeyFieldTypeDescriptionRequirednessDefault value
1boolSettingsmap<string, bool>This includes User + Device Overriden Settings default
2textSettingsmap<string, string>default
3optionSettingsmap<string, string>default
4referenceListSettingsmap<string, list<setting.Reference>>default
5stringListSettingsmap<string, list<string>>default
20prioritieslist<job.PriorityLevel>optional

Struct: AuthTokenMetaResult

KeyFieldTypeDescriptionRequirednessDefault value
1userIdstringdefault
2creatorIdstringdefault
3createdAti64default
4userEmailstringoptional
5creatorEmailstringoptional
6revokedAti64optional
7revokedByIdstringoptional
8revokedByEmailstringoptional
9tokenstringoptional
10userNamestringoptional
11creatorNamestringoptional
12revokedByNamestringoptional

Struct: LoginResult

KeyFieldTypeDescriptionRequirednessDefault value
1authTokenstringdefault
2currentUseruser.Userdefault
3teamIdToTeamRolemap<string, list<user.TeamRole>>Map of all the roles currentUser has across all the teams she is a part of default
4teamIdToRegionIdmap<string, string>The following two maps indicate the API host to contact for customers with non-US deployments. Every team is located on one region, and the maps specify which region each of the teams you can access are located, and for each of them what the relevant hostnames are. default
5regionIdToRegionmap<string, team.Region>default
6preferredRegionIdstringdefault
7periodsAuthPeriodsdefault
8teamIdToJobPermissionsmap<string, job_role.JobPermissions>default
9teamIdToInfomap<string, TeamInfo>default
10mothershipCertificatestringThis is a server signed certificate you can use to authenticate other people's certificate in mesh mode optional
11userCertificatestringIf you requested the server to sign a certificate this response will have the PEM encoded cert optional
12sessionIdstringSession ID for the current login (also encoded in the authToken) default
13proxyUserEmailstringLogged in through the crendentials of this (super admin) user optional
14currentUserModularuser.UserModulardefault
15userPinHashstring* The hash of the user pin if there is one * optional

Struct: WebSSOAuth

KeyFieldTypeDescriptionRequirednessDefault value
1urlstringrelative URL on MotherShip to send browser to to begin (includes a query token) default

Struct: PasswordAuth

KeyFieldTypeDescriptionRequirednessDefault value

currently a sentinel type, but could also be used to pass any extra useful details about the password authentication (eg, minimum length)

Struct: IdpAuth

KeyFieldTypeDescriptionRequirednessDefault value
1idpAliasstringIdentity provider alias for IDP brokering optional
2issuerstringoptional
3authorizationEndpointstringoptional
4tokenEndpointstringoptional
5isMultiTeambooloptional
6endSessionEndpointstringoptional

Struct: ValidAuthTypes

KeyFieldTypeDescriptionRequirednessDefault value
1passwordAuthPasswordAuthoptional
2webSSOWebSSOAuthoptional
3isAutomaticallyProvisionedbooloptional
4isSSObooloptional
5idpAuthIdpAuthoptional
6isIdpAuthbooloptional

Struct: LoginOptions

KeyFieldTypeDescriptionRequirednessDefault value
1certificateSigningRequeststringSend up a PEM encoded certificate signing request for mothership to sign You can then use this certificate later on prove your authenticity to other people. Mothership will override any parameters it sees fit (will use same public key) So always use the LoginResult#userCertificate you get back down optional
2proxiedUserEmailstringLogin as this user, but with a proxy super admin account If the account is not a super admin, the login would be rejected The returned token and user will be the proxied user's, with the `proxyUserEmail` set to the admin's email optional

Struct: LoginTeamInfo

KeyFieldTypeDescriptionRequirednessDefault value
1namestringdefault
2teamIdstringdefault

Struct: TeamSelectResult

KeyFieldTypeDescriptionRequirednessDefault value
1loginResultLoginResultoptional
2teamInfolist<LoginTeamInfo>optional

Struct: SSORequest

KeyFieldTypeDescriptionRequirednessDefault value
1providerSSOProviderrequired
2tokenstringoptional
3parameterstringoptional


Services

Service: AuthenticationService

Function: AuthenticationService.login

LoginResult login(string email,
                  string password,
                  LoginOptions options)
    throws common.SystemException
NOAUTH HIDE_ARG{options}

Function: AuthenticationService.loginWithSSO

LoginResult loginWithSSO(SSORequest request)
    throws common.SystemException
Validates a token gotten by a third party service and returns a Parsable auth token. Provider: which provider is used for authenticate. Token: the token to validate with the provider. Options: Provider specific

Function: AuthenticationService.loginWithTeamSelect

TeamSelectResult loginWithTeamSelect(string email,
                                     string password,
                                     LoginOptions options)
    throws common.SystemException
This endpoint checks if the user is on multiple teams. If they are it returns a list of teams to select from or if the user is only on a single team they will be logged in

Function: AuthenticationService.loginWithIdp

LoginResult loginWithIdp(LoginOptions options)
    throws common.SystemException
Parses a Parsable IDP Authorization header Bearer token. Returns a Parsable auth token.

Function: AuthenticationService.loginWithIdpAndTeam

LoginResult loginWithIdpAndTeam(string teamId,
                                LoginOptions options)
    throws common.SystemException
Parses a Parsable IDP Authorization header Bearer token. Returns a Parsable auth token. TeamId is required.

Function: AuthenticationService.loginWithIdpAndTeamSelect

TeamSelectResult loginWithIdpAndTeamSelect(LoginOptions options)
    throws common.SystemException
* Parses a Parsable IDP Authorization header Bearer token. If the user belongs to multiple teams this returns a list of teams to select from. * If the user is only on a single team they will be logged in.

Function: AuthenticationService.logout

void logout()
    throws common.SystemException
Logout

Function: AuthenticationService.createTeamToken

LoginResult createTeamToken(string teamId)
    throws common.SystemException
Exchange a token for a token with a teamId *

Function: AuthenticationService.loginWithToken

LoginResult loginWithToken(string authToken)
    throws common.SystemException