@Generated(value="OracleSDKGenerator", comments="API Version: 20190501") public final class JwtAuthenticationPolicy extends AuthenticationPolicy
Validate a JWT token present in the header or query parameter. A valid policy must specify either
tokenHeader or tokenQueryParam.
Note: Objects should always be created or deserialized using the JwtAuthenticationPolicy.Builder
. This model
distinguishes fields that are null
because they are unset from fields that are explicitly
set to null
. This is done in the setter methods of the JwtAuthenticationPolicy.Builder
, which maintain a
set of all explicitly set fields called JwtAuthenticationPolicy.Builder.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take the explicitly set
fields into account. The constructor, on the other hand, does not take the explicitly set fields
into account (since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
JwtAuthenticationPolicy.Builder |
AuthenticationPolicy.Type
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
JwtAuthenticationPolicy(Boolean isAnonymousAccessAllowed,
String tokenHeader,
String tokenQueryParam,
String tokenAuthScheme,
Float maxClockSkewInSeconds,
List<String> issuers,
List<String> audiences,
List<JsonWebTokenClaim> verifyClaims,
PublicKeySet publicKeys)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static JwtAuthenticationPolicy.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
List<String> |
getAudiences()
The list of intended recipients for the token.
|
List<String> |
getIssuers()
A list of parties that could have issued the token.
|
Float |
getMaxClockSkewInSeconds()
The maximum expected time difference between the system clocks of the token issuer and the
API Gateway.
|
PublicKeySet |
getPublicKeys() |
String |
getTokenAuthScheme()
The authentication scheme that is to be used when authenticating the token.
|
String |
getTokenHeader()
The name of the header containing the authentication token.
|
String |
getTokenQueryParam()
The name of the query parameter containing the authentication token.
|
List<JsonWebTokenClaim> |
getVerifyClaims()
A list of claims which should be validated to consider the token valid.
|
int |
hashCode() |
JwtAuthenticationPolicy.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
getIsAnonymousAccessAllowed
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated public JwtAuthenticationPolicy(Boolean isAnonymousAccessAllowed, String tokenHeader, String tokenQueryParam, String tokenAuthScheme, Float maxClockSkewInSeconds, List<String> issuers, List<String> audiences, List<JsonWebTokenClaim> verifyClaims, PublicKeySet publicKeys)
public static JwtAuthenticationPolicy.Builder builder()
Create a new builder.
public JwtAuthenticationPolicy.Builder toBuilder()
public String getTokenHeader()
The name of the header containing the authentication token.
public String getTokenQueryParam()
The name of the query parameter containing the authentication token.
public String getTokenAuthScheme()
The authentication scheme that is to be used when authenticating the token. This must to be provided if “tokenHeader” is specified.
public Float getMaxClockSkewInSeconds()
The maximum expected time difference between the system clocks of the token issuer and the API Gateway.
public List<String> getIssuers()
A list of parties that could have issued the token.
public List<String> getAudiences()
The list of intended recipients for the token.
public List<JsonWebTokenClaim> getVerifyClaims()
A list of claims which should be validated to consider the token valid.
public PublicKeySet getPublicKeys()
public String toString()
toString
in class AuthenticationPolicy
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
toString
in class AuthenticationPolicy
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class AuthenticationPolicy
public int hashCode()
hashCode
in class AuthenticationPolicy
Copyright © 2016–2024. All rights reserved.