CustomAuthenticationPolicy¶
-
class
oci.apigateway.models.
CustomAuthenticationPolicy
(**kwargs)¶ Bases:
oci.apigateway.models.authentication_policy.AuthenticationPolicy
Use 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
TYPE_CUSTOM_AUTHENTICATION
str(object=’’) -> str TYPE_JWT_AUTHENTICATION
str(object=’’) -> str TYPE_TOKEN_AUTHENTICATION
str(object=’’) -> str cache_key
Gets the cache_key of this CustomAuthenticationPolicy. function_id
[Required] Gets the function_id of this CustomAuthenticationPolicy. is_anonymous_access_allowed
Gets the is_anonymous_access_allowed of this AuthenticationPolicy. parameters
Gets the parameters of this CustomAuthenticationPolicy. token_header
Gets the token_header of this CustomAuthenticationPolicy. token_query_param
Gets the token_query_param of this CustomAuthenticationPolicy. type
[Required] Gets the type of this AuthenticationPolicy. validation_failure_policy
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'¶
-
TYPE_JWT_AUTHENTICATION
= 'JWT_AUTHENTICATION'¶
-
TYPE_TOKEN_AUTHENTICATION
= 'TOKEN_AUTHENTICATION'¶
-
__init__
(**kwargs)¶ Initializes a new CustomAuthenticationPolicy object with values from keyword arguments. The default value of the
type
attribute of this class isCUSTOM_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 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.
-
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]
-
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.
-
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
-
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)
-
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
-
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
-
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
-
validation_failure_policy
¶ Gets the validation_failure_policy of this CustomAuthenticationPolicy.
Returns: The validation_failure_policy of this CustomAuthenticationPolicy. Return type: oci.apigateway.models.ValidationFailurePolicy
-