connector

package
v2.0.0-alpha.5+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 License: Apache-2.0 Imports: 1 Imported by: 584

Documentation

Overview

Package connector defines interfaces for federated identity strategies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackConnector

type CallbackConnector interface {
	LoginURL(callbackURL, state string) (string, error)
	HandleCallback(r *http.Request) (identity Identity, err error)
}

CallbackConnector is an optional interface for callback based connectors.

type Connector

type Connector interface {
	Close() error
}

Connector is a mechanism for federating login to a remote identity service.

Implementations are expected to implement either the PasswordConnector or CallbackConnector interface.

type GroupsConnector added in v0.6.0

type GroupsConnector interface {
	Groups(identity Identity) ([]string, error)
}

GroupsConnector is an optional interface for connectors which can map a user to groups.

type Identity

type Identity struct {
	UserID        string
	Username      string
	Email         string
	EmailVerified bool

	// ConnectorData holds data used by the connector for subsequent requests after initial
	// authentication, such as access tokens for upstream provides.
	//
	// This data is never shared with end users, OAuth clients, or through the API.
	ConnectorData []byte
}

Identity represents the ID Token claims supported by the server.

type PasswordConnector

type PasswordConnector interface {
	Login(username, password string) (identity Identity, validPassword bool, err error)
}

PasswordConnector is an optional interface for password based connectors.

Directories

Path Synopsis
Package github provides authentication strategies using GitHub.
Package github provides authentication strategies using GitHub.
Package ldap implements strategies for authenticating using the LDAP protocol.
Package ldap implements strategies for authenticating using the LDAP protocol.
Package mock implements connectors which help test various server components.
Package mock implements connectors which help test various server components.
Package oidc implements logging in through OpenID Connect providers.
Package oidc implements logging in through OpenID Connect providers.

Jump to

Keyboard shortcuts

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