JwtAuthenticationPolicy¶
-
class
oci.apigateway.models.
JwtAuthenticationPolicy
(**kwargs)¶ Bases:
oci.apigateway.models.authentication_policy.AuthenticationPolicy
Validate a JWT token present in the header or query parameter. A valid policy must specify either tokenHeader or tokenQueryParam.
Attributes
TYPE_CUSTOM_AUTHENTICATION
str(object=’’) -> str TYPE_JWT_AUTHENTICATION
str(object=’’) -> str TYPE_TOKEN_AUTHENTICATION
str(object=’’) -> str audiences
[Required] Gets the audiences of this JwtAuthenticationPolicy. is_anonymous_access_allowed
Gets the is_anonymous_access_allowed of this AuthenticationPolicy. issuers
[Required] Gets the issuers of this JwtAuthenticationPolicy. max_clock_skew_in_seconds
Gets the max_clock_skew_in_seconds of this JwtAuthenticationPolicy. public_keys
[Required] Gets the public_keys of this JwtAuthenticationPolicy. token_auth_scheme
Gets the token_auth_scheme of this JwtAuthenticationPolicy. token_header
Gets the token_header of this JwtAuthenticationPolicy. token_query_param
Gets the token_query_param of this JwtAuthenticationPolicy. type
[Required] Gets the type of this AuthenticationPolicy. verify_claims
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'¶
-
TYPE_JWT_AUTHENTICATION
= 'JWT_AUTHENTICATION'¶
-
TYPE_TOKEN_AUTHENTICATION
= 'TOKEN_AUTHENTICATION'¶
-
__init__
(**kwargs)¶ Initializes a new JwtAuthenticationPolicy object with values from keyword arguments. The default value of the
type
attribute of this class isJWT_AUTHENTICATION
and 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.
-
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.
-
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
-
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]
-
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
-
public_keys
¶ [Required] Gets the public_keys of this JwtAuthenticationPolicy.
Returns: The public_keys of this JwtAuthenticationPolicy. Return type: oci.apigateway.models.PublicKeySet
-
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
-
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
-
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
-
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
-
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: list[oci.apigateway.models.JsonWebTokenClaim]
-