Class SessionAuthenticator

  • All Implemented Interfaces:
    Authenticator

    public final class SessionAuthenticator
    extends com.couchbase.lite.internal.BaseAuthenticator
    SessionAuthenticator class is an authenticator that will authenticate by using the session ID of the session created by a Sync Gateway
    • Constructor Summary

      Constructors 
      Constructor Description
      SessionAuthenticator​(java.lang.String sessionID)
      Initializes with the Sync Gateway session ID and uses the default cookie name.
      SessionAuthenticator​(java.lang.String sessionID, java.lang.String cookieName)
      Initializes with the session ID and the cookie name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCookieName()
      Return session cookie name that the session ID value will be set to when communicating the Sync Gateway.
      java.lang.String getSessionID()
      Return session ID of the session created by a Sync Gateway.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SessionAuthenticator

        public SessionAuthenticator​(@NonNull
                                    java.lang.String sessionID)
        Initializes with the Sync Gateway session ID and uses the default cookie name.
        Parameters:
        sessionID - Sync Gateway session ID
      • SessionAuthenticator

        public SessionAuthenticator​(@NonNull
                                    java.lang.String sessionID,
                                    @Nullable
                                    java.lang.String cookieName)
        Initializes with the session ID and the cookie name. If the given cookieName is null, the default cookie name will be used.
        Parameters:
        sessionID - Sync Gateway session ID
        cookieName - The cookie name
    • Method Detail

      • getSessionID

        @NonNull
        public java.lang.String getSessionID()
        Return session ID of the session created by a Sync Gateway.
      • getCookieName

        @Nullable
        public java.lang.String getCookieName()
        Return session cookie name that the session ID value will be set to when communicating the Sync Gateway.