ClaimsHelper
@appfire/fuse-auth-core • Docs
@appfire/fuse-auth-core / ClaimsHelper
Class: ClaimsHelper
Helper class for working with claims in a token.
Constructors
new ClaimsHelper()
new ClaimsHelper():
ClaimsHelper
Returns
Properties
getUserIdFromToken()
static
getUserIdFromToken: (token
,productType
) =>string
Retrieves the user ID from the given token based on the product type.
Parameters
• token: string
The token from which to extract the user ID.
• productType: "monday"
| "confluence"
| "jira"
| "bitbucket"
The type of product (e.g., 'Atlassian', 'Monday').
Returns
string
The user ID extracted from the token.
Throws
Error if the product type is invalid.
Defined in
tokenClaims()
static
tokenClaims: (token
) =>Claims
Retrieves the claims from the given token.
Parameters
• token: string
The token from which to extract the claims.
Returns
The claims extracted from the token.