okta

package
v0.0.0-...-649aced Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func Must

func Must(host, token string, mfa duo.Duo) *Authenticator

func New

func New(host, token string, mfa duo.Duo) (*Authenticator, error)

New creates a new Okta authenticator. An error may be returned if the token or host are in the incorrect format - please refer to the Okta documentation at github.com/okta/okta-sdk-golang/

func (*Authenticator) Authenticate

Authenticate retrieves a list of applications for user with the given username and password.

This will first attempt to validate if the user has the appropriate credentials before returning applications for that user.

func (*Authenticator) GenerateSAMLAssertion

func (a *Authenticator) GenerateSAMLAssertion(ctx context.Context, creds core.Credentials, appID string) (*core.SAMLResponse, core.AuthenticationProviderError)

GenerateSAMLAssertion should generate a SAML assertion that the user may exchange with the target application in order to gain access to it. This will initiate a multi-factor request with Duo.

func (*Authenticator) ListApplications

ListApplications should list all the applications the given user is entitled to access.

type OktaError

type OktaError error

OktaError is an error from Okta.

var (
	ErrOktaBadRequest            OktaError = errors.New("bad request")
	ErrOktaUnauthorized          OktaError = errors.New("unauthorized")
	ErrOktaForbidden             OktaError = errors.New("forbidden")
	ErrOktaCouldNotCreateSession OktaError = errors.New("could not create a session")
	ErrOktaSAMLError             OktaError = errors.New("could not get a SAML response")
	ErrOktaInternalServerError   OktaError = errors.New("internal server error")
	ErrOktaUnspecified           OktaError = errors.New("unspecified")
)

A list of standard errors that can be returned by by Okta client.

Jump to

Keyboard shortcuts

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