authenticators

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package authenticators provides types that authenticate to the Splunk REST API and satisfy the client.Authenticator interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatorTestCase

type AuthenticatorTestCase struct {
	// contains filtered or unexported fields
}

AuthenticatorTestCase defines a test against a specific Authenticator and Client.

type AuthenticatorTestCases

type AuthenticatorTestCases []AuthenticatorTestCase

AuthenticatorTestCases is a list of AuthenticatorTestCase instances.

type Password

type Password struct {
	Username string `values:"username"`
	Password string `values:"password"`

	// UseBasicAuth can be set to true if Basic Authentication should always be used,
	// which causes Username/Password to be passed with each authenticated request.
	UseBasicAuth bool `values:"-"`

	// SessionKey holds the SessionKey after initial authentication occurs. Unless
	// UseBasicAuth is set to true, this SessionKey will be used to authenticate requests.
	SessionKey `url:"-"`
	// contains filtered or unexported fields
}

Password defines password authentication to Splunk.

func (*Password) AuthenticateRequest

func (p *Password) AuthenticateRequest(c *client.Client, r *http.Request) error

AuthenticateRequest adds authentication to an http.Request.

type SessionKey

type SessionKey struct {
	// SessionKey is the session key that will be used to authenticate to Splunk.
	SessionKey string `xml:"sessionKey"`
}

SessionKey provides authentication to Splunk via a session key.

func (SessionKey) AuthenticateRequest

func (s SessionKey) AuthenticateRequest(c *client.Client, r *http.Request) error

AuthenticateRequest adds the SessionKey to the http.Request's Header.

type Token

type Token struct {
	// Token is the token that will be used to authenticate to Splunk.
	Token string
}

Token provides authentication to Splunk via a bearer token.

func (Token) AuthenticateRequest

func (t Token) AuthenticateRequest(c *client.Client, r *http.Request) error

AuthenticateRequest adds the Token to the http.Request's Header.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL