Skip to content

Authorization

Outgoing Messages

GetAuthorizationData

Get the authorization data from the platform implementation.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "GetAuthorizationData"
        }
    },
    "payload": {
        "service": {{String}},
        "key": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
key String Yes The key for the requested data.

AuthorizationError

Notifies the platform implementation of an authorization error.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "AuthorizationError"
        }
    },
    "payload": {
        "service": {{String}},
        "error": {{String}},
        "message": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
error String Yes The authorization error that occurred.
message String Yes The message describing the authorization error.

SetAuthorizationData

Notifies the platform implementation to store authorization data.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "SetAuthorizationData"
        }
    },
    "payload": {
        "service": {{String}},
        "key": {{String}},
        "data": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
key String Yes The key for the requested data.
data String Yes The value of the data.

EventReceived

Notifies the platform implementation of a received authorization event.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "EventReceived"
        }
    },
    "payload": {
        "service": {{String}},
        "event": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
event String Yes The JSON string representing the received event.

AuthorizationStateChanged

Notifies the platform implementation that the authorization state changed.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "AuthorizationStateChanged"
        }
    },
    "payload": {
        "service": {{String}},
        "state": {{AuthorizationState}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
state AuthorizationState Yes The new authorization state.

Incoming Messages

SendEvent

Notifies the Engine of an authorization event.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "SendEvent"
        }
    },
    "payload": {
        "service": {{String}},
        "event": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
event String Yes The JSON string representing the payload of the event.

CancelAuthorization

Notifies the Engine to cancel the authorization process.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "CancelAuthorization"
        }
    },
    "payload": {
        "service": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.

Logout

Notifies the Engine that device has been logged out.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "Logout"
        }
    },
    "payload": {
        "service": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.

StartAuthorization

Notifies the Engine to start the authorization process.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "StartAuthorization"
        }
    },
    "payload": {
        "service": {{String}},
        "data": {{String}}        
    }
}

Payload

Property Type Required Description Example
service String Yes The service used for authorization.
data String Yes The value of the data.

GetAuthorizationDataReply

Reply for GetAuthorizationData message.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Reply",
        "id": {{String}},
        "messageDescription": {
            "topic": "Authorization",
            "action": "GetAuthorizationData",
            "replyToId": {{String}}        
        }
    },
    "payload": {
        "data": {{String}}        
    }
}

Payload

Property Type Required Description Example
data String Yes The data associated with the key if available, otherwise an empty string.

Enums

AuthorizationState

Values

Value Description
"UNAUTHORIZED" Device is unauthorized.
"AUTHORIZING" Device authorization is in progress.
"AUTHORIZED" Device is authorized.