interface RoleCredentialsInterface (View source)

Role-credentials capability.

A single CNR-class capability segregated off the shared client contract: composing a role login (":") from an account id, a role id and the role user's own password. This is NOT part of the universal client surface because it depends on a role separator that only the CNR platform defines (":"); flat platforms such as IBS/Moniker have no separator, so inheriting the behaviour there would silently forge a garbage <uid><role> login rather than reject it. Consumers holding the shared {\CNIC\AbstractClient} type narrow via instanceof RoleCredentialsInterface before calling it. Mirrors the {\CNIC\ExtendedResponseInterface} precedent on the Response side.

Methods

setRoleCredentials(string $accountId = "", string $roleId = "", string $password = "")

Set Role Credentials to be used for API communication

Details

RoleCredentialsInterface setRoleCredentials(string $accountId = "", string $roleId = "", string $password = "")

Set Role Credentials to be used for API communication

Parameters

string $accountId

empty string resets it

string $roleId

empty string logs in as the account itself, without a role

string $password

the role user's own password; empty string resets it

Return Value

RoleCredentialsInterface