Documentation
¶
Index ¶
Constants ¶
View Source
const (
AUTHTYPE_COUCHDB_SESSION = "COUCHDB_SESSION"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CouchDbSessionAuthenticator ¶
type CouchDbSessionAuthenticator struct {
// [Required] The username and password used to access CouchDB session end-point
Username, Password string
// CouchDB URL inherited from the service request.
URL string
// A flag that indicates whether verification of the server's SSL certificate should be disabled
DisableSSLVerification bool
// contains filtered or unexported fields
}
CouchDbSessionAuthenticator uses username and password to obtain CouchDB authentication cookie, and adds the cookie to requests.
func NewCouchDbSessionAuthenticator ¶
func NewCouchDbSessionAuthenticator(username, password string) (*CouchDbSessionAuthenticator, error)
NewCouchDbSessionAuthenticator constructs a new NewCouchDbSessionAuthenticator instance.
func NewCouchDbSessionAuthenticatorFromMap ¶
func NewCouchDbSessionAuthenticatorFromMap(props map[string]string) (*CouchDbSessionAuthenticator, error)
NewCouchDbSessionAuthenticatorFromMap constructs a new NewCouchDbSessionAuthenticator instance from a map.
func (*CouchDbSessionAuthenticator) Authenticate ¶
func (a *CouchDbSessionAuthenticator) Authenticate(request *http.Request) error
Authenticate adds session authentication cookie to a request.
func (*CouchDbSessionAuthenticator) AuthenticationType ¶
func (a *CouchDbSessionAuthenticator) AuthenticationType() string
AuthenticationType returns the authentication type for this authenticator.
func (*CouchDbSessionAuthenticator) SetClient ¶ added in v0.5.0
func (a *CouchDbSessionAuthenticator) SetClient(client *http.Client)
SetClient sets the http client for the authenticator.
func (*CouchDbSessionAuthenticator) Validate ¶
func (a *CouchDbSessionAuthenticator) Validate() error
Validate the authenticator's configuration. Ensures the service url, username and password are valid and not nil.
Click to show internal directories.
Click to hide internal directories.