CustomAuthenticationPolicy¶
- class oci.apigateway.models.CustomAuthenticationPolicy(**kwargs)¶
Bases:
AuthenticationPolicyUse a function to validate a custom header or query parameter sent with the request authentication. 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 cache_key of this CustomAuthenticationPolicy.
[Required] Gets the function_id of this CustomAuthenticationPolicy.
Gets the is_anonymous_access_allowed of this AuthenticationPolicy.
Gets the parameters of this CustomAuthenticationPolicy.
Gets the token_header of this CustomAuthenticationPolicy.
Gets the token_query_param of this CustomAuthenticationPolicy.
[Required] Gets the type of this AuthenticationPolicy.
Gets the validation_failure_policy of this CustomAuthenticationPolicy.
Methods:
__init__(**kwargs)Initializes a new CustomAuthenticationPolicy 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 CustomAuthenticationPolicy object with values from keyword arguments. The default value of the
typeattribute of this class isCUSTOM_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 CustomAuthenticationPolicy.
type (str) – The value to assign to the type property of this CustomAuthenticationPolicy. Allowed values for this property are: “CUSTOM_AUTHENTICATION”, “JWT_AUTHENTICATION”, “TOKEN_AUTHENTICATION”
function_id (str) – The value to assign to the function_id property of this CustomAuthenticationPolicy.
token_header (str) – The value to assign to the token_header property of this CustomAuthenticationPolicy.
token_query_param (str) – The value to assign to the token_query_param property of this CustomAuthenticationPolicy.
parameters (dict(str, str)) – The value to assign to the parameters property of this CustomAuthenticationPolicy.
cache_key (list[str]) – The value to assign to the cache_key property of this CustomAuthenticationPolicy.
validation_failure_policy (oci.apigateway.models.ValidationFailurePolicy) – The value to assign to the validation_failure_policy property of this CustomAuthenticationPolicy.
- property cache_key¶
Gets the cache_key of this CustomAuthenticationPolicy. A list of keys from “parameters” attribute value whose values will be added to the cache key.
- Returns
The cache_key of this CustomAuthenticationPolicy.
- Return type
list[str]
- property function_id¶
[Required] Gets the function_id of this CustomAuthenticationPolicy. The OCID of the Oracle Functions function resource.
- Returns
The function_id of this CustomAuthenticationPolicy.
- Return type
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 parameters¶
Gets the parameters of this CustomAuthenticationPolicy. A map where key is a user defined string and value is a context expressions whose values will be sent to the custom auth function. Values should contain an expression. Example: {“foo”: “request.header[abc]”}
- Returns
The parameters of this CustomAuthenticationPolicy.
- Return type
dict(str, str)
- property token_header¶
Gets the token_header of this CustomAuthenticationPolicy. The name of the header containing the authentication token.
- Returns
The token_header of this CustomAuthenticationPolicy.
- Return type
str
- property token_query_param¶
Gets the token_query_param of this CustomAuthenticationPolicy. The name of the query parameter containing the authentication token.
- Returns
The token_query_param of this CustomAuthenticationPolicy.
- 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 CustomAuthenticationPolicy.
- Returns
The validation_failure_policy of this CustomAuthenticationPolicy.
- Return type