TokenAuthenticationPolicy¶
- class oci.apigateway.models.TokenAuthenticationPolicy(**kwargs)¶
Bases:
AuthenticationPolicyValidate a 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.
Gets the is_anonymous_access_allowed of this AuthenticationPolicy.
Gets the max_clock_skew_in_seconds of this TokenAuthenticationPolicy.
Gets the token_auth_scheme of this TokenAuthenticationPolicy.
Gets the token_header of this TokenAuthenticationPolicy.
Gets the token_query_param of this TokenAuthenticationPolicy.
[Required] Gets the type of this AuthenticationPolicy.
Gets the validation_failure_policy of this TokenAuthenticationPolicy.
[Required] Gets the validation_policy of this TokenAuthenticationPolicy.
Methods:
__init__(**kwargs)Initializes a new TokenAuthenticationPolicy 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 TokenAuthenticationPolicy object with values from keyword arguments. The default value of the
typeattribute of this class isTOKEN_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 TokenAuthenticationPolicy.
type (str) – The value to assign to the type property of this TokenAuthenticationPolicy. 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 TokenAuthenticationPolicy.
token_query_param (str) – The value to assign to the token_query_param property of this TokenAuthenticationPolicy.
token_auth_scheme (str) – The value to assign to the token_auth_scheme property of this TokenAuthenticationPolicy.
max_clock_skew_in_seconds (float) – The value to assign to the max_clock_skew_in_seconds property of this TokenAuthenticationPolicy.
validation_policy (oci.apigateway.models.TokenAuthenticationValidationPolicy) – The value to assign to the validation_policy property of this TokenAuthenticationPolicy.
validation_failure_policy (oci.apigateway.models.ValidationFailurePolicy) – The value to assign to the validation_failure_policy property of this TokenAuthenticationPolicy.
- 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 max_clock_skew_in_seconds¶
Gets the max_clock_skew_in_seconds of this TokenAuthenticationPolicy. 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 TokenAuthenticationPolicy.
- Return type
float
- property token_auth_scheme¶
Gets the token_auth_scheme of this TokenAuthenticationPolicy. 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 TokenAuthenticationPolicy.
- Return type
str
- property token_header¶
Gets the token_header of this TokenAuthenticationPolicy. The name of the header containing the authentication token.
- Returns
The token_header of this TokenAuthenticationPolicy.
- Return type
str
- property token_query_param¶
Gets the token_query_param of this TokenAuthenticationPolicy. The name of the query parameter containing the authentication token.
- Returns
The token_query_param of this TokenAuthenticationPolicy.
- 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 validation_failure_policy¶
Gets the validation_failure_policy of this TokenAuthenticationPolicy.
- Returns
The validation_failure_policy of this TokenAuthenticationPolicy.
- Return type
- property validation_policy¶
[Required] Gets the validation_policy of this TokenAuthenticationPolicy.
- Returns
The validation_policy of this TokenAuthenticationPolicy.
- Return type