JwtAuthenticationPolicy¶
- class oci.apigateway.models.JwtAuthenticationPolicy(**kwargs)¶
Bases:
AuthenticationPolicyValidate a JWT token present in the header or query parameter. A valid policy must specify either tokenHeader or tokenQueryParam.
Attributes:
A constant which can be used with the type property of a AuthenticationPolicy.
A constant which can be used with the type property of a AuthenticationPolicy.
A constant which can be used with the type property of a AuthenticationPolicy.
[Required] Gets the audiences of this JwtAuthenticationPolicy.
Gets the is_anonymous_access_allowed of this AuthenticationPolicy.
[Required] Gets the issuers of this JwtAuthenticationPolicy.
Gets the max_clock_skew_in_seconds of this JwtAuthenticationPolicy.
[Required] Gets the public_keys of this JwtAuthenticationPolicy.
Gets the token_auth_scheme of this JwtAuthenticationPolicy.
Gets the token_header of this JwtAuthenticationPolicy.
Gets the token_query_param of this JwtAuthenticationPolicy.
[Required] Gets the type of this AuthenticationPolicy.
Gets the verify_claims of this JwtAuthenticationPolicy.
Methods:
__init__(**kwargs)Initializes a new JwtAuthenticationPolicy object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- TYPE_CUSTOM_AUTHENTICATION = 'CUSTOM_AUTHENTICATION'¶
A constant which can be used with the type property of a AuthenticationPolicy. This constant has a value of “CUSTOM_AUTHENTICATION”
- TYPE_JWT_AUTHENTICATION = 'JWT_AUTHENTICATION'¶
A constant which can be used with the type property of a AuthenticationPolicy. This constant has a value of “JWT_AUTHENTICATION”
- TYPE_TOKEN_AUTHENTICATION = 'TOKEN_AUTHENTICATION'¶
A constant which can be used with the type property of a AuthenticationPolicy. This constant has a value of “TOKEN_AUTHENTICATION”
- __init__(**kwargs)¶
Initializes a new JwtAuthenticationPolicy object with values from keyword arguments. The default value of the
typeattribute of this class isJWT_AUTHENTICATIONand it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):- Parameters
is_anonymous_access_allowed (bool) – The value to assign to the is_anonymous_access_allowed property of this JwtAuthenticationPolicy.
type (str) – The value to assign to the type property of this JwtAuthenticationPolicy. Allowed values for this property are: “CUSTOM_AUTHENTICATION”, “JWT_AUTHENTICATION”, “TOKEN_AUTHENTICATION”
token_header (str) – The value to assign to the token_header property of this JwtAuthenticationPolicy.
token_query_param (str) – The value to assign to the token_query_param property of this JwtAuthenticationPolicy.
token_auth_scheme (str) – The value to assign to the token_auth_scheme property of this JwtAuthenticationPolicy.
max_clock_skew_in_seconds (float) – The value to assign to the max_clock_skew_in_seconds property of this JwtAuthenticationPolicy.
issuers (list[str]) – The value to assign to the issuers property of this JwtAuthenticationPolicy.
audiences (list[str]) – The value to assign to the audiences property of this JwtAuthenticationPolicy.
verify_claims (list[oci.apigateway.models.JsonWebTokenClaim]) – The value to assign to the verify_claims property of this JwtAuthenticationPolicy.
public_keys (oci.apigateway.models.PublicKeySet) – The value to assign to the public_keys property of this JwtAuthenticationPolicy.
- property audiences¶
[Required] Gets the audiences of this JwtAuthenticationPolicy. The list of intended recipients for the token.
- Returns
The audiences of this JwtAuthenticationPolicy.
- Return type
list[str]
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property is_anonymous_access_allowed¶
Gets the is_anonymous_access_allowed of this AuthenticationPolicy. Whether an unauthenticated user may access the API. Must be “true” to enable ANONYMOUS route authorization.
- Returns
The is_anonymous_access_allowed of this AuthenticationPolicy.
- Return type
bool
- property issuers¶
[Required] Gets the issuers of this JwtAuthenticationPolicy. A list of parties that could have issued the token.
- Returns
The issuers of this JwtAuthenticationPolicy.
- Return type
list[str]
- property max_clock_skew_in_seconds¶
Gets the max_clock_skew_in_seconds of this JwtAuthenticationPolicy. The maximum expected time difference between the system clocks of the token issuer and the API Gateway.
- Returns
The max_clock_skew_in_seconds of this JwtAuthenticationPolicy.
- Return type
float
- property public_keys¶
[Required] Gets the public_keys of this JwtAuthenticationPolicy.
- Returns
The public_keys of this JwtAuthenticationPolicy.
- Return type
- property token_auth_scheme¶
Gets the token_auth_scheme of this JwtAuthenticationPolicy. The authentication scheme that is to be used when authenticating the token. This must to be provided if “tokenHeader” is specified.
- Returns
The token_auth_scheme of this JwtAuthenticationPolicy.
- Return type
str
- property token_header¶
Gets the token_header of this JwtAuthenticationPolicy. The name of the header containing the authentication token.
- Returns
The token_header of this JwtAuthenticationPolicy.
- Return type
str
- property token_query_param¶
Gets the token_query_param of this JwtAuthenticationPolicy. The name of the query parameter containing the authentication token.
- Returns
The token_query_param of this JwtAuthenticationPolicy.
- Return type
str
- property type¶
[Required] Gets the type of this AuthenticationPolicy. Type of the authentication policy to use.
Allowed values for this property are: “CUSTOM_AUTHENTICATION”, “JWT_AUTHENTICATION”, “TOKEN_AUTHENTICATION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The type of this AuthenticationPolicy.
- Return type
str
- property verify_claims¶
Gets the verify_claims of this JwtAuthenticationPolicy. A list of claims which should be validated to consider the token valid.
- Returns
The verify_claims of this JwtAuthenticationPolicy.
- Return type