public class JoseVerifyResponse extends ApiResponse
/api/jose/verify API.| Constructor and Description |
|---|
JoseVerifyResponse() |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getErrorDescriptions()
Get the list of error messages.
|
String[] |
getInvalidClaims()
Get the list of invalid claims.
|
String[] |
getMissingClaims()
Get the list of missing claims; the claims that are not included in the
payload part of the JOSE object although they are listed in the
mandatoryClaims request parameter. |
boolean |
isSignatureValid()
Get the result of the signature verification.
|
boolean |
isValid()
Get the result of the verification on the JOSE object.
|
JoseVerifyResponse |
setErrorDescriptions(String[] descriptions)
Set the list of error messages.
|
JoseVerifyResponse |
setInvalidClaims(String[] claims)
Set the list of invalid claims.
|
JoseVerifyResponse |
setMissingClaims(String[] claims)
Set the list of missing claims.
|
JoseVerifyResponse |
setSignatureValid(boolean valid)
Set the result of the signature verification.
|
JoseVerifyResponse |
setValid(boolean valid)
Set the result of the verification on the JOSE object.
|
getResultCode, getResultMessage, setResultCode, setResultMessagepublic boolean isValid()
true if the JOSE object passed to Authlete's
/api/jose/verify API is valid.public JoseVerifyResponse setValid(boolean valid)
valid - true to indicate that the JOSE object passed to
Authlete's /api/jose/verify API is valid.this object.public boolean isSignatureValid()
If the given JOSE object is signed and its signature has been
successfully verified, this method returns true.
true if the signature of the JOSE is valid.public JoseVerifyResponse setSignatureValid(boolean valid)
valid - true to indicate the signature of the JOSE is valid.this object.public String[] getMissingClaims()
mandatoryClaims request parameter.
For example, if the value of the mandatoryClaims parameter of
the request was ["exp", "iat"] and if the payload part of the
JOSE object contains the exp claim but does not contain the
iat claim, this method returns ["iat"].
Note that this method returns null if the payload part of the
JOSE object could not be retrieved. For example, in the case that the
value of the jose request parameter could not be parsed as JOSE.
public JoseVerifyResponse setMissingClaims(String[] claims)
claims - Missing claims.this object.public String[] getInvalidClaims()
For example, if the payload of the JOSE object can be parsed as JSON
and the JSON has an exp claim and if the value of the claim
indicates that the JOSE object has expired, "exp" will be
included in the list of invalid claims returned from this method.
public JoseVerifyResponse setInvalidClaims(String[] claims)
claims - Invalid claims.this object.public String[] getErrorDescriptions()
When the JOSE object is valid (= when isValid() method returns
true), this method returns null.
public JoseVerifyResponse setErrorDescriptions(String[] descriptions)
descriptions - List of error messages.this object.Copyright © 2019. All rights reserved.