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
function_id [Required] Gets the function_id of this CustomAuthenticationPolicy.
is_anonymous_access_allowed Gets the is_anonymous_access_allowed of this AuthenticationPolicy.
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.

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'
__init__(**kwargs)

Initializes a new CustomAuthenticationPolicy object with values from keyword arguments. The default value of the type attribute of this class is CUSTOM_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”
  • 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.
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
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”, ‘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