public class CognitoJWTParser
extends java.lang.Object
Constructor and Description |
---|
CognitoJWTParser() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getClaim(java.lang.String jwt,
java.lang.String claim)
Returns a claim, from the
JWT s' payload, as a String. |
static org.json.JSONObject |
getHeader(java.lang.String jwt)
Returns header for a JWT as a JSON object.
|
static org.json.JSONObject |
getPayload(java.lang.String jwt)
Returns payload of a JWT as a JSON object.
|
static java.lang.String |
getSignature(java.lang.String jwt)
Returns signature of a JWT as a String.
|
static void |
validateJWT(java.lang.String jwt)
Checks if
JWT is a valid JSON Web Token. |
public static org.json.JSONObject getHeader(java.lang.String jwt)
jwt
- REQUIRED: valid JSON Web Token as String.public static org.json.JSONObject getPayload(java.lang.String jwt)
jwt
- REQUIRED: valid JSON Web Token as String.public static java.lang.String getSignature(java.lang.String jwt)
jwt
- REQUIRED: valid JSON Web Token as String.public static java.lang.String getClaim(java.lang.String jwt, java.lang.String claim)
JWT
s' payload, as a String.jwt
- REQUIRED: valid JSON Web Token as String.claim
- REQUIRED: claim name as String.public static void validateJWT(java.lang.String jwt)
JWT
is a valid JSON Web Token.jwt
- REQUIRED: The JWT as a String
.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.