@Generated(value="OracleSDKGenerator", comments="API Version: 20190501") public final class CustomAuthenticationPolicy extends 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.
Note: Objects should always be created or deserialized using the CustomAuthenticationPolicy.Builder
. This model
distinguishes fields that are null
because they are unset from fields that are explicitly
set to null
. This is done in the setter methods of the CustomAuthenticationPolicy.Builder
, which maintain a
set of all explicitly set fields called CustomAuthenticationPolicy.Builder.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take the explicitly set
fields into account. The constructor, on the other hand, does not take the explicitly set fields
into account (since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
CustomAuthenticationPolicy.Builder |
AuthenticationPolicy.Type
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
CustomAuthenticationPolicy(Boolean isAnonymousAccessAllowed,
String functionId,
String tokenHeader,
String tokenQueryParam,
Map<String,String> parameters,
List<String> cacheKey,
ValidationFailurePolicy validationFailurePolicy)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static CustomAuthenticationPolicy.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
List<String> |
getCacheKey()
A list of keys from “parameters” attribute value whose values will be added to the cache key.
|
String |
getFunctionId()
The OCID of the
Oracle Functions function resource.
|
Map<String,String> |
getParameters()
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.
|
String |
getTokenHeader()
The name of the header containing the authentication token.
|
String |
getTokenQueryParam()
The name of the query parameter containing the authentication token.
|
ValidationFailurePolicy |
getValidationFailurePolicy() |
int |
hashCode() |
CustomAuthenticationPolicy.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
getIsAnonymousAccessAllowed
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
public static CustomAuthenticationPolicy.Builder builder()
Create a new builder.
public CustomAuthenticationPolicy.Builder toBuilder()
public String getFunctionId()
The OCID of the Oracle Functions function resource.
public String getTokenHeader()
The name of the header containing the authentication token.
public String getTokenQueryParam()
The name of the query parameter containing the authentication token.
public Map<String,String> getParameters()
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]"}
public List<String> getCacheKey()
A list of keys from “parameters” attribute value whose values will be added to the cache key.
public ValidationFailurePolicy getValidationFailurePolicy()
public String toString()
toString
in class AuthenticationPolicy
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
toString
in class AuthenticationPolicy
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class AuthenticationPolicy
public int hashCode()
hashCode
in class AuthenticationPolicy
Copyright © 2016–2024. All rights reserved.