Class UnverifiedJsonWebToken
java.lang.Object
com.palantir.tokens.auth.UnverifiedJsonWebToken
@Safe
@Immutable(builder=false,
copy=false)
public abstract class UnverifiedJsonWebToken
extends Object
Represents the parsed form of a JWT but does not verify the token signature.
The information provided by this class should not be used for any security-sensitive application unless verified through some other process (e.g. by querying another service known to perform validation).
An anticipated use of this class is making a best-effort user id extraction for logging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the unverified organization id, i.e.Returns the unverified first-party service name, i.e.Returns the unverified session id, i.e.Returns the unverified token id, i.e.abstract @Safe StringReturns the unverified user id, i.e., the "sub" claim, of the JWT.static UnverifiedJsonWebTokenof(BearerToken token) Attempts to create anUnverifiedJsonWebTokenfrom providedBearerToken.static Optional<UnverifiedJsonWebToken> Does a lower cost check on the structure of string provided before attempting to create anUnverifiedJsonWebToken.
-
Constructor Details
-
UnverifiedJsonWebToken
public UnverifiedJsonWebToken()
-
-
Method Details
-
getUnverifiedUserId
Returns the unverified user id, i.e., the "sub" claim, of the JWT. -
getUnverifiedSessionId
-
getUnverifiedTokenId
-
getUnverifiedOrganizationId
-
getUnverifiedService
-
tryParse
Does a lower cost check on the structure of string provided before attempting to create anUnverifiedJsonWebToken. -
of
Attempts to create anUnverifiedJsonWebTokenfrom providedBearerToken.The information provided by this class should not be used for any security-sensitive application unless verified through some other process (e.g. by querying another service known to perform validation).
An anticipated use of this class is making a best-effort user id extraction for logging.
-