A container for the data transmitted from Staffbase app to a plugin using the Staffbase single-sign-on.
- Full name: \Staffbase\plugins\sdk\SSOToken
Constructor
SSOToken::__construct( string $appSecret, string $tokenData )Parameters:
| Parameter | Type | Description |
|---|---|---|
$appSecret |
string | Either a key or a file:// URL. |
$tokenData |
string | The token text. |
Get targeted audience of the token.
SSOToken::getAudience( ): null|stringGet the time when the token expires.
SSOToken::getExpireAtTime( ): integerGet the time when the token starts to be valid.
SSOToken::getNotBeforeTime( ): integerGet the time when the token was issued.
SSOToken::getIssuedAtTime( ): integerGet issuer of the token.
SSOToken::getIssuer( ): null|stringGet the (plugin) instance id for which the token was issued.
SSOToken::getInstanceId( ): stringThe id will always be present.
Get the (plugin) instance name for which the token was issued.
SSOToken::getInstanceName( ): null|stringGet the id of the authenticated user.
SSOToken::getUserId( ): null|stringGet the id of the user in an external system.
SSOToken::getUserExternalId( ): null|stringExample use case would be to map user from an external store to the entry defined in the token.
Get either the combined name of the user or the name of the token.
SSOToken::getFullName( ): null|stringGet the first name of the user accessing.
SSOToken::getFirstName( ): null|stringGet the last name of the user accessing.
SSOToken::getLastName( ): null|stringGet the role of the accessing user.
SSOToken::getRole( ): null|stringIf this is set to “editor”, the requesting user may manage the contents of the plugin instance, i.e. she has administration rights. The type of the accessing entity can be either a “user” or a “editor”.
Get the type of the token.
SSOToken::getType( ): null|stringThe type of the accessing entity can be either a “user” or a “token”.
Get text color used in the overall theme for this audience.
SSOToken::getThemeTextColor( ): null|stringThe color is represented as a CSS-HEX code.
Get background color used in the overall theme for this audience.
SSOToken::getThemeBackgroundColor( ): null|stringThe color is represented as a CSS-HEX code.
Get the locale of the requesting user in the format of language tags.
SSOToken::getLocale( ): null|stringCheck if the user is an editor.
SSOToken::isEditor( ): booleanThe user will always have a user role to prevent a bug class on missing values. Only when the editor role is explicitly provided the user will be marked as editor.
Get all data stored in the token.
SSOToken::getData( ): arrayThis document was automatically generated from source code comments on 2017-03-03 using phpDocumentor and cvuorinen/phpdoc-markdown-public