public class SSOData extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_AUDIENCE
The key in the JWT claims for fetching the audience of the request.
|
static String |
KEY_BRANCH_ID
The key in the JWT claims for the fetching the requested branch id for the installation
|
static String |
KEY_BRANCH_SLUG
The key in the JWT claims for the fetching the requested branch slug for the installation
|
static String |
KEY_ENTITY_TYPE
The key in the JWT claims for fetching the the type of the accessing
entity.
|
static String |
KEY_INSTANCE_ID
The key in the JWT claims for fetching the requested plugin instance's
unique id.
|
static String |
KEY_INSTANCE_NAME
The key in the JWT claims for fetching the requested plugin instance's
name.
|
static String |
KEY_ISSUER
The key in the JWT claims for fetching the issuer name.
|
static String |
KEY_SESSION_ID
The key in the JWT claims for fetching a cipher of the session
|
static String |
KEY_TAGS
The key in the JWT claims for fetching the list of tags
that are configured in the Staffbase app.
|
static String |
KEY_THEME_BACKGROUND_COLOR
The key in the JWT claims for fetching the color of the background
that is configured in the Staffbase app.
|
static String |
KEY_THEME_TEXT_COLOR
The key in the JWT claims for fetching the color of the text that
is configured in the Staffbase app.
|
static String |
KEY_USER_EXTERNAL_ID
The key in the JWT claims for fetching the requesting user's id in an
external system.
|
static String |
KEY_USER_FIRST_NAME
The key in the JWT claims for fetching the requesting user's first name.
|
static String |
KEY_USER_FULL_NAME
The key in the JWT claims for fetching the requesting user's full
name.
|
static String |
KEY_USER_ID
The key in the JWT claims for fetching the requesting user's unique id.
|
static String |
KEY_USER_LAST_NAME
The key in the JWT claims for fetching the requesting user's last name.
|
static String |
KEY_USER_LOCALE
The key in the JWT claims for fetching the requesting user's locale
settings.
|
static String |
KEY_USER_PRIMARY_EMAIL_ADDRESS
The key in the JWT claims for fetching the requesting user's primary email address.
|
static String |
KEY_USER_ROLE
The key in the JWT claims for fetching the requesting users role.
|
static String |
KEY_USER_USERNAME
The key in the JWT claims for fetching the requesting user's username.
|
static String |
REMOTE_CALL_DELETE
The user id/subject to identify if the SSO call is an instance deletion call.
|
static String |
ROLE_EDITOR
The name of the role which is sent by staffbase to a plugin, if the requesting
user may alter the plugin's contents, i.e.
|
| Constructor and Description |
|---|
SSOData(org.jose4j.jwt.JwtClaims jwtClaims)
Constructor of the SSOData class
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getAudience()
Get the name of the audience the staffbase's SSO data is dedicated.
|
String |
getBranchID()
Get the branch identifier of the installation
|
String |
getBranchSlug()
Get the name of the branch an installation belongs to
|
Optional<String> |
getEntityType()
Get the type of the accessing entity making the request using staffbase's SSO.
|
String |
getInstanceID()
Get the unique id of the specific plugin instance that was requested using
staffbase's SSO.
|
Optional<String> |
getInstanceName()
Get the Name of the specific plugin instance that was requested using
staffbase's SSO.
|
Optional<String> |
getIssuer()
Get the name of the issuing authority for Stabase's SSO .
|
Optional<String> |
getSessionId()
Get a cipher of the session id that was requested using staffbase's SSO.
|
Optional<List<String>> |
getTags()
Get the tags of the user in regards of the requested
instanceID. |
Optional<String> |
getThemeBackgroundColor()
Get the color of the background that is configured in the Staffbase app.
|
Optional<String> |
getThemeTextColor()
Get the color of the text that is configured in the Staffbase app.
|
Optional<String> |
getUserExternalID()
Get the id of the requesting user in an external system, if given.
|
Optional<String> |
getUserFirstName()
Get the first, i.e.
|
Optional<String> |
getUserFullName()
Get the full name of the user making the request using staffbase's SSO.
|
Optional<String> |
getUserID()
Get the unique id of the staffbase user making the request to the plugin using
staffbase's SSO.
|
Optional<String> |
getUserLastName()
Get the last, i.e.
|
Optional<Locale> |
getUserLocale()
Get the locale of the user requesting the plugin instance.
|
Optional<String> |
getUserLocaleAsString()
Get the locale of the user requesting the plugin instance as the originally
transmitted string.
|
Optional<String> |
getUserPrimaryEmailAddress()
Get the primary email address of the requesting user, if given.
|
Optional<String> |
getUserRole()
Get the role of the user in regards of the requested
instanceID. |
Optional<String> |
getUserUsername()
Get the username of the requesting user, if given.
|
boolean |
isDeleteInstanceCall()
Check if the SSO call is an instance deletion call.
|
boolean |
isEditor()
Check whether the requesting user is configured as an editor of the
requested plugin instance.
|
String |
toString() |
public static final String KEY_BRANCH_ID
public static final String KEY_BRANCH_SLUG
public static final String ROLE_EDITOR
public static final String REMOTE_CALL_DELETE
public static final String KEY_INSTANCE_ID
public static final String KEY_SESSION_ID
public static final String KEY_USER_ID
public static final String KEY_USER_EXTERNAL_ID
public static final String KEY_USER_USERNAME
public static final String KEY_USER_PRIMARY_EMAIL_ADDRESS
public static final String KEY_USER_FIRST_NAME
public static final String KEY_USER_LAST_NAME
public static final String KEY_USER_ROLE
public static final String KEY_USER_LOCALE
public static final String KEY_ISSUER
public static final String KEY_AUDIENCE
public static final String KEY_INSTANCE_NAME
public static final String KEY_USER_FULL_NAME
public static final String KEY_ENTITY_TYPE
public static final String KEY_THEME_TEXT_COLOR
public static final String KEY_THEME_BACKGROUND_COLOR
public static final String KEY_TAGS
public SSOData(org.jose4j.jwt.JwtClaims jwtClaims)
throws org.jose4j.jwt.MalformedClaimException
jwtClaims - The claims of an decoded JWT tokenorg.jose4j.jwt.MalformedClaimException - The jwt token is invalidpublic String getBranchID()
branchIDpublic String getBranchSlug()
branchSlugpublic Optional<String> getIssuer()
issuerpublic Optional<String> getAudience()
audiencepublic Optional<String> getInstanceName()
instanceNamepublic Optional<String> getSessionId()
sessionIDpublic Optional<String> getUserFullName()
userFullNamepublic Optional<String> getEntityType()
entityTypepublic Optional<String> getThemeTextColor()
themeTextColorpublic Optional<String> getThemeBackgroundColor()
themeBackgroundColorpublic String getInstanceID()
instanceIDpublic Optional<String> getUserID()
userIDpublic Optional<String> getUserExternalID()
userExternalIDpublic Optional<String> getUserUsername()
userUsernamepublic Optional<String> getUserPrimaryEmailAddress()
userPrimaryEmailAddresspublic Optional<String> getUserFirstName()
userFirstNamepublic Optional<String> getUserLastName()
userLastNamepublic Optional<String> getUserLocaleAsString()
userLocalepublic Optional<Locale> getUserLocale()
userLocalepublic Optional<String> getUserRole()
instanceID.
If the requesting user does have admin permissions, this value is set to
"editor".userRolepublic boolean isEditor()
true if the requesting user is an editor.userRolepublic boolean isDeleteInstanceCall()
true if the SSO call is an instance deletion callpublic Optional<List<String>> getTags()
instanceID.
If the requesting user does have admin permissions, this value is set to
"editor".tagsCopyright © 2023 Staffbase. All rights reserved.