touchstone

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadCreds = errors.New("touchstone: bad credentials")

ErrBadCreds is returned when the given credentials were invalid.

View Source
var ErrBadParent = errors.New("touchstone: bad parent in Duo response")

ErrBadParent is returned when the Duo response is for a different parent than Touchstone.

View Source
var ErrServer = errors.New("touchstone: server error")

ErrServer is returned when there's an unexpected error with the Touchstone servers.

View Source
var ErrUnknownResponse = errors.New("touchstone: unknown response")

ErrUnknownResponse is returned when Touchstone gives a response that couldn't be handled.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

A Client handles authentication to Touchstone, and can then be used to authenticate to SSO-enabled services.

func NewClient

func NewClient() *Client

NewClient creates a new Touchstone client.

func NewClientWithHTTPClient

func NewClientWithHTTPClient(httpClient *http.Client) *Client

NewClientWithHTTPClient creates a new Touchstone client, using the provided *http.Client.

func (*Client) AuthenticateToResource

func (c *Client) AuthenticateToResource(resourceURL string) (*http.Response, error)

AuthenticateToResource uses the Client's Touchstone session to authenticate to the given resource.

func (*Client) BeginUsernamePasswordAuth

func (c *Client) BeginUsernamePasswordAuth(username string, password string) (*duo.Challenge, error)

BeginUsernamePasswordAuth starts the Touchstone authentication process with a Kerberos username and password.

func (*Client) CompleteAuthWithDuo

func (c *Client) CompleteAuthWithDuo(final *duo.FinalResponse) error

CompleteAuthWithDuo uses the given duo.FinalResponse to finish the Touchstone authnetication process.

Jump to

Keyboard shortcuts

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