Skip to content

Latest commit

 

History

History
372 lines (166 loc) · 4.47 KB

File metadata and controls

372 lines (166 loc) · 4.47 KB

API Documentation

Table of Contents

SSOToken

A container for the data transmitted from Staffbase app to a plugin using the Staffbase single-sign-on.

  • Full name: \Staffbase\plugins\sdk\SSOToken

__construct

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.

getAudience

Get targeted audience of the token.

SSOToken::getAudience(  ): null|string

getExpireAtTime

Get the time when the token expires.

SSOToken::getExpireAtTime(  ): integer

getNotBeforeTime

Get the time when the token starts to be valid.

SSOToken::getNotBeforeTime(  ): integer

getIssuedAtTime

Get the time when the token was issued.

SSOToken::getIssuedAtTime(  ): integer

getIssuer

Get issuer of the token.

SSOToken::getIssuer(  ): null|string

getInstanceId

Get the (plugin) instance id for which the token was issued.

SSOToken::getInstanceId(  ): string

The id will always be present.


getInstanceName

Get the (plugin) instance name for which the token was issued.

SSOToken::getInstanceName(  ): null|string

getUserId

Get the id of the authenticated user.

SSOToken::getUserId(  ): null|string

getUserExternalId

Get the id of the user in an external system.

SSOToken::getUserExternalId(  ): null|string

Example use case would be to map user from an external store to the entry defined in the token.


getFullName

Get either the combined name of the user or the name of the token.

SSOToken::getFullName(  ): null|string

getFirstName

Get the first name of the user accessing.

SSOToken::getFirstName(  ): null|string

getLastName

Get the last name of the user accessing.

SSOToken::getLastName(  ): null|string

getRole

Get the role of the accessing user.

SSOToken::getRole(  ): null|string

If 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”.


getType

Get the type of the token.

SSOToken::getType(  ): null|string

The type of the accessing entity can be either a “user” or a “token”.


getThemeTextColor

Get text color used in the overall theme for this audience.

SSOToken::getThemeTextColor(  ): null|string

The color is represented as a CSS-HEX code.


getThemeBackgroundColor

Get background color used in the overall theme for this audience.

SSOToken::getThemeBackgroundColor(  ): null|string

The color is represented as a CSS-HEX code.


getLocale

Get the locale of the requesting user in the format of language tags.

SSOToken::getLocale(  ): null|string

isEditor

Check if the user is an editor.

SSOToken::isEditor(  ): boolean

The 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.


getData

Get all data stored in the token.

SSOToken::getData(  ): array


This document was automatically generated from source code comments on 2017-03-03 using phpDocumentor and cvuorinen/phpdoc-markdown-public