Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidOptions = errors.New("invalid options")
)
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
Identifier string `json:"identifier"`
DeviceCode string `json:"device_code"`
UserCode string `json:"user_code"`
SessionIdentifier string `json:"session_identifier"`
EncryptedSession string `json:"encrypted_session"`
LastPoll time.Time `json:"last_poll"`
ExpiresAt time.Time `json:"expires_at"`
}
Device holds the Device Code Authorization Flow
type Flow ¶
type Flow interface {
// Key returns the authentication provider's unique key
Key() Key
// Start starts the Provider
Start() error
// Stop stops the Provider
Stop() error
}
Flow is an authentication flow provider that authorizes a user and returns a set of claims
type Github ¶
type Github struct {
Identifier string `json:"identifier"`
Verifier string `json:"verifier"`
Challenge string `json:"challenge"`
NextURL string `json:"next_url"`
Organization string `json:"organization"`
DeviceIdentifier string `json:"device_identifier"`
}
Github holds the Github Authorization Flow
type Google ¶
type Google struct {
Identifier string `json:"identifier"`
Verifier string `json:"verifier"`
Challenge string `json:"challenge"`
NextURL string `json:"next_url"`
Organization string `json:"organization"`
DeviceIdentifier string `json:"device_identifier"`
}
Google holds the Google Authorization Flow
type Key ¶
type Key string
Key uniquely identifies authentication providers
Each provider must create its own globally unique key
type Magic ¶
type Magic struct {
Email string `json:"email"`
IPAddress string `json:"ip_address"`
Salt []byte `json:"salt"`
Hash []byte `json:"hash"`
NextURL string `json:"next_url"`
Organization string `json:"organization"`
DeviceIdentifier string `json:"device_identifier"`
}
Magic holds the Magic Authorization Flow
Click to show internal directories.
Click to hide internal directories.