Skip to content

AuthProvider

Outgoing Messages

GetAuthToken

Returns the token used by the platform implementation for authorization with AVS. The platform implementation should retrieve an auth token if it does not have one.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "AuthProvider",
            "action": "GetAuthToken"
        }
    }
}

GetAuthState

Returns the AVS authorization state of the platform implementation.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "AuthProvider",
            "action": "GetAuthState"
        }
    }
}

Incoming Messages

AuthStateChanged

Notifies the Engine of a change in AVS authorization state in the platform implementation.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "AuthProvider",
            "action": "AuthStateChanged"
        }
    },
    "payload": {
        "authState": {{AuthState}},
        "authError": {{AuthError}}        
    }
}

Payload

Property Type Required Description Example
authState AuthState Yes The new authorization state.
authError AuthError Yes The error state of the authorization attempt.

GetAuthTokenReply

Reply for GetAuthToken message.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Reply",
        "id": {{String}},
        "messageDescription": {
            "topic": "AuthProvider",
            "action": "GetAuthToken",
            "replyToId": {{String}}        
        }
    },
    "payload": {
        "authToken": {{String}}        
    }
}

Payload

Property Type Required Description Example
authToken String Yes The token used to authorize with AVS.

GetAuthStateReply

Reply for GetAuthState message.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Reply",
        "id": {{String}},
        "messageDescription": {
            "topic": "AuthProvider",
            "action": "GetAuthState",
            "replyToId": {{String}}        
        }
    },
    "payload": {
        "state": {{AuthState}}        
    }
}

Payload

Property Type Required Description Example
state AuthState Yes The AVS authorization state.

Enums

AuthError

Values

Value Description
"NO_ERROR" No error encountered.
"UNKNOWN_ERROR" An error was encountered, but no error description can be determined.
"AUTHORIZATION_FAILED" The client authorization failed.
"UNAUTHORIZED_CLIENT" The client is not authorized to use authorization codes.
"SERVER_ERROR" The server encountered a runtime error.
"INVALID_REQUEST" The request is missing a required parameter, has an invalid value, or is otherwise malformed.
"INVALID_VALUE" One of the values in the request was invalid.
"AUTHORIZATION_EXPIRED" The authorization code is invalid, expired, revoked, or was issued to a different client.
"UNSUPPORTED_GRANT_TYPE" The client specified the wrong token type.
"INVALID_CODE_PAIR" Invalid code pair provided in Code-based linking token request.
"AUTHORIZATION_PENDING" Waiting for user to authorize the specified code pair.
"SLOW_DOWN" Client should slow down in the rate of requests polling for an access token.
"INTERNAL_ERROR" Internal error in client code.
"INVALID_CBL_CLIENT_ID" Client ID not valid for use with code based linking.

AuthState

Values

Value Description
"UNINITIALIZED" Authorization has not yet been acquired.
"REFRESHED" Authorization has been refreshed.
"EXPIRED" Authorization has expired.
"UNRECOVERABLE_ERROR" Authorization has failed in a manner that cannot be corrected by retrying.