jumpcloud

package
v2.36.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdentifierTotpMfa          = "totp"
	IdentifierDuoMfa           = "duo"
	IdentifierU2F              = "webauthn"
	IdentifierJumpCloudProtect = "push"
)
View Source
const (
	MaxOpenRetries = 10
	RetryDelayMS   = 200 * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	Context    string
	RedirectTo string
	Email      string
	Password   string
	OTP        string
}

AuthRequest is to be sent to JumpCloud as the auth req body

type Client

type Client struct {
	provider.ValidateBase
	// contains filtered or unexported fields
}

Client is a wrapper representing a JumpCloud SAML client

func New

func New(idpAccount *cfg.IDPAccount) (*Client, error)

New creates a new JumpCloud client

func (*Client) Authenticate

func (jc *Client) Authenticate(loginDetails *creds.LoginDetails) (string, error)

Authenticate logs into JumpCloud and returns a SAML response

type DeviceFinder added in v2.29.0

type DeviceFinder interface {
	// contains filtered or unexported methods
}

DeviceFinder is used to mock out finding devices

type FidoClient added in v2.29.0

type FidoClient struct {
	Device u2fhost.Device
	// contains filtered or unexported fields
}

FidoClient represents a challenge and the device used to respond

func NewFidoClient added in v2.29.0

func NewFidoClient(challenge, rpId, keyHandle, token string, deviceFinder DeviceFinder) (FidoClient, error)

NewFidoClient returns a new initialized FIDO1-based WebAuthnClient, representing a single device

func (*FidoClient) ChallengeU2F added in v2.29.0

func (d *FidoClient) ChallengeU2F() (*JumpCloudResponse, error)

ChallengeU2F takes a FidoClient and returns a signed assertion to send to Okta

type JCMessage added in v2.27.1

type JCMessage struct {
	Message string `json:"message"`
}

type JCRedirect

type JCRedirect struct {
	Address string `json:"redirectTo"`
}

JCRedirect is for unmarshalling the redirect address from the response after the auth

type JumpCloudPushResponse added in v2.33.0

type JumpCloudPushResponse struct {
	ID          string    `json:"id"`
	ExpiresAt   time.Time `json:"expiresAt"`
	InitiatedAt time.Time `json:"initiatedAt"`
	Status      string    `json:"status"`
	UserId      string    `json:"userId"`
}

type JumpCloudResponse added in v2.29.0

type JumpCloudResponse struct {
	PublicKeyCredential PublicKey `json:"publicKeyCredential"`
	Token               string    `json:"token"`
}

type PublicKey added in v2.29.0

type PublicKey struct {
	Id       string            `json:"id"`
	RawId    string            `json:"rawId"`
	Type     string            `json:"type"`
	Response PublicKeyResponse `json:"response"`
}

type PublicKeyResponse added in v2.29.0

type PublicKeyResponse struct {
	ClientData        string  `json:"clientDataJSON"`
	AuthenticatorData string  `json:"authenticatorData"`
	SignatureData     string  `json:"signature"`
	UserHandle        *string `json:"userHandle"`
}

type U2FDevice added in v2.29.0

type U2FDevice interface {
	u2fhost.Device
}

U2FDevice is used to support mocking this device with mockery https://github.com/vektra/mockery/issues/210#issuecomment-485026348

type U2FDeviceFinder added in v2.29.0

type U2FDeviceFinder struct{}

U2FDeviceFinder returns a U2F device

type XSRF

type XSRF struct {
	Token string `json:"xsrf"`
}

XSRF is for unmarshalling the xsrf token in the response

Jump to

Keyboard shortcuts

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