RTM role-based authentication.
Client connection to RTM is established in default role. Client can acquire different the permissions by authenticating for a different role. This is done in a two-step process using the Handshake and then Authenticate PDU.
package |
Default |
---|
__construct(string $role, string $role_secret, array $options = array())
string
Role name
string
Role secret key
array
RoleAuth options
$options = [
'logger' => (Psr\Log\LoggerInterface) Logger
]
authenticate(\RtmClient\Connection $connection) : boolean
Throws |
|
---|
boolean
true if successfully authenticates, false otherwise
handshake() : boolean
boolean
true if successfully authenticates, false otherwise
roleSecretAuth(string $nonce) : true
Throws |
|
---|
string
Nonce from RTM reply on handshake
true
if successfully authenticated
READ_TIMEOUT_SEC
ERROR_CODE_NONCE_NOT_FOUND
ERROR_CODE_FAILED_TO_AUTHENTICATE
auth_in_progress : boolean
var |
---|
boolean