Class CouchDbSessionAuthenticator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String AUTH_TYPE  
      • Fields inherited from class com.ibm.cloud.sdk.core.security.AuthenticatorBase

        ERRORMSG_ATLEAST_ONE_PROP_ERROR, ERRORMSG_ATMOST_ONE_PROP_ERROR, ERRORMSG_EXCLUSIVE_PROP_ERROR, ERRORMSG_PROP_INVALID, ERRORMSG_PROP_INVALID_INTEGER_VALUE, ERRORMSG_PROP_MISSING, ERRORMSG_REQ_FAILED
      • Fields inherited from interface com.ibm.cloud.sdk.core.security.Authenticator

        AUTHTYPE_BASIC, AUTHTYPE_BEARER_TOKEN, AUTHTYPE_CONTAINER, AUTHTYPE_CP4D, AUTHTYPE_CP4D_SERVICE, AUTHTYPE_CP4D_SERVICE_INSTANCE, AUTHTYPE_IAM, AUTHTYPE_NOAUTH, AUTHTYPE_VPC, PROPNAME_APIKEY, PROPNAME_AUTH_TYPE, PROPNAME_BEARER_TOKEN, PROPNAME_CLIENT_ID, PROPNAME_CLIENT_SECRET, PROPNAME_CR_TOKEN_FILENAME, PROPNAME_DISABLE_SSL, PROPNAME_DISPLAY_NAME, PROPNAME_EXPIRATION_TIME, PROPNAME_IAM_PROFILE_CRN, PROPNAME_IAM_PROFILE_ID, PROPNAME_IAM_PROFILE_NAME, PROPNAME_PASSWORD, PROPNAME_PERMISSIONS, PROPNAME_SCOPE, PROPNAME_SERVICE_BROKER_SECRET, PROPNAME_SERVICE_INSTANCE_ID, PROPNAME_UID, PROPNAME_URL, PROPNAME_USERNAME
    • Method Detail

      • newAuthenticator

        public static com.ibm.cloud.sdk.core.security.Authenticator newAuthenticator​(String username,
                                                                                     String password)
        Get a new Authenticator instance for the supplied service URL and credentials that provides authentication via the Apache CouchDB _session endpoint.
        Parameters:
        username - the username
        password - the password
        Returns:
        new Authenticator instance
      • getCookieJar

        public com.ibm.cloud.sdk.core.http.ServiceCookieJar getCookieJar()
        Getter for the cookie jar used to store the session information.
        Returns:
        the cookie jar
      • setHttpConfigOptions

        public void setHttpConfigOptions​(com.ibm.cloud.sdk.core.http.HttpConfigOptions options)
        Setter to configure this authenticator with HttpConfigOptions. This is called internally to apply the configuration options of the service client automatically.
        Parameters:
        options -
      • setSessionUrl

        public void setSessionUrl​(String serviceUrl)
        Setter to configure this authenticator with a new session URL derived from the supplied service URL. This is called internally to apply the service URL from the service client automatically.
        Parameters:
        serviceUrl -
      • invalidateToken

        public void invalidateToken()
        For internal use to invalidate the local token and force a refresh cycle with the server.