Class CustomAuthenticationPolicy


  • @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).

    • Method Detail

      • getFunctionId

        public String getFunctionId()
        The OCID of the Oracle Functions function resource.
        Returns:
        the value
      • getTokenHeader

        public String getTokenHeader()
        The name of the header containing the authentication token.
        Returns:
        the value
      • getTokenQueryParam

        public String getTokenQueryParam()
        The name of the query parameter containing the authentication token.
        Returns:
        the value
      • getParameters

        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]”}

        Returns:
        the value
      • getCacheKey

        public List<String> getCacheKey()
        A list of keys from “parameters” attribute value whose values will be added to the cache key.
        Returns:
        the value
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Overrides:
        toString in class AuthenticationPolicy
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation