onelogin

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdentifierOneLoginProtectMfa = "OneLogin Protect"
	IdentifierSmsMfa             = "OneLogin SMS"
	IdentifierTotpMfa            = "Google Authenticator"

	MessageMFARequired = "MFA is required for this user"
	MessageSuccess     = "Success"
	TypePending        = "pending"
	TypeSuccess        = "success"
)

MFA identifier constants.

View Source
const ProviderName = "OneLogin"

ProviderName constant holds the name of the OneLogin IDP.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	AppID     string `json:"app_id"`
	Password  string `json:"password"`
	Subdomain string `json:"subdomain"`
	Username  string `json:"username_or_email"`
	IPAddress string `json:"ip_address,omitempty"`
}

AuthRequest represents an mfa OneLogin request.

type Client

type Client struct {
	// AppID represents the OneLogin connector id.
	AppID string
	// Client is the HTTP client for accessing the IDP provider's APIs.
	Client *provider.HTTPClient
	// A predefined MFA name.
	MFA string
	// Subdomain is the organisation subdomain in OneLogin.
	Subdomain string
}

Client is a wrapper representing a OneLogin SAML client.

func New

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

New creates a new OneLogin client.

func (*Client) Authenticate

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

Authenticate logs into OneLogin and returns a SAML response.

type VerifyRequest

type VerifyRequest struct {
	AppID       string `json:"app_id"`
	DeviceID    string `json:"device_id"`
	DoNotNotify bool   `json:"do_not_notify"`
	OTPToken    string `json:"otp_token,omitempty"`
	StateToken  string `json:"state_token"`
}

VerifyRequest represents an mfa verify request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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