public class JwtCredential extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JwtCredential.InvalidJwtToken |
| Constructor and Description |
|---|
JwtCredential(String jwtToken)
Build a JWT credential from a token with an sha256 key used for signing
|
JwtCredential(String jwtToken,
boolean checkExpired) |
| Modifier and Type | Method and Description |
|---|---|
static JwtCredential |
fromHeader(String authHeader)
Build a JWT credential from a header value (normally Authorization)
|
String |
getIssuer() |
String |
getSignature() |
String |
getSignedContent() |
String |
getSigningAlgorithm() |
String |
getSubject() |
boolean |
isForAudience(String aud) |
String |
toBearerString() |
String |
toString() |
public JwtCredential(String jwtToken) throws JwtCredential.InvalidJwtToken
jwtToken - a tokenJwtCredential.InvalidJwtToken - when the token is invalidpublic JwtCredential(String jwtToken, boolean checkExpired) throws JwtCredential.InvalidJwtToken
JwtCredential.InvalidJwtTokenpublic static JwtCredential fromHeader(String authHeader) throws JwtCredential.InvalidJwtToken
authHeader - the authentication header valueJwtCredential.InvalidJwtToken - when the token is invalidpublic String toBearerString()
public String getSignedContent()
public String getSignature()
public String getSubject()
public String getIssuer()
public boolean isForAudience(String aud)
public String getSigningAlgorithm()
Copyright © 2021 continual.io. All rights reserved.