identity

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package identity provides support for making OpenID Connect (OIDC) and OAuth2 authenticated HTTP requests with third party identity providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate(context.Context, string, interface{}) (*oauth2.Token, error)
	Refresh(context.Context, *oauth2.Token, interface{}) (*oauth2.Token, error)
	Revoke(context.Context, *oauth2.Token) error
	GetSignInURL(state string) string
	LogOut() (*url.URL, error)
	UpdateUserInfo(ctx context.Context, t *oauth2.Token, v interface{}) error
}

Authenticator is an interface representing the ability to authenticate with an identity provider.

func NewAuthenticator added in v0.8.0

func NewAuthenticator(o oauth.Options) (a Authenticator, err error)

NewAuthenticator returns a new identity provider based on its name.

type MockProvider

type MockProvider struct {
	AuthenticateResponse oauth2.Token
	AuthenticateError    error
	RefreshResponse      oauth2.Token
	RefreshError         error
	RevokeError          error
	GetSignInURLResponse string
	LogOutResponse       url.URL
	LogOutError          error
	UpdateUserInfoError  error
}

MockProvider provides a mocked implementation of the providers interface.

func (MockProvider) Authenticate

func (mp MockProvider) Authenticate(context.Context, string, interface{}) (*oauth2.Token, error)

Authenticate is a mocked providers function.

func (MockProvider) GetSignInURL

func (mp MockProvider) GetSignInURL(s string) string

GetSignInURL is a mocked providers function.

func (MockProvider) LogOut added in v0.8.0

func (mp MockProvider) LogOut() (*url.URL, error)

LogOut is a mocked providers function.

func (MockProvider) Refresh

func (mp MockProvider) Refresh(context.Context, *oauth2.Token, interface{}) (*oauth2.Token, error)

Refresh is a mocked providers function.

func (MockProvider) Revoke

func (mp MockProvider) Revoke(ctx context.Context, s *oauth2.Token) error

Revoke is a mocked providers function.

func (MockProvider) UpdateUserInfo added in v0.10.0

func (mp MockProvider) UpdateUserInfo(ctx context.Context, t *oauth2.Token, v interface{}) error

UpdateUserInfo is a mocked providers function.

Directories

Path Synopsis
Package manager contains an identity manager responsible for refreshing sessions and creating users.
Package manager contains an identity manager responsible for refreshing sessions and creating users.
Package oauth provides support for making OAuth2 authorized and authenticated HTTP requests, as specified in RFC 6749.
Package oauth provides support for making OAuth2 authorized and authenticated HTTP requests, as specified in RFC 6749.
github
Package github implements OAuth2 based authentication for github https://www.pomerium.io/docs/identity-providers/github.html
Package github implements OAuth2 based authentication for github https://www.pomerium.io/docs/identity-providers/github.html
Package oidc implements a generic OpenID Connect provider.
Package oidc implements a generic OpenID Connect provider.
azure
Package azure implements OpenID Connect for Microsoft Azure https://www.pomerium.io/docs/identity-providers/azure.html
Package azure implements OpenID Connect for Microsoft Azure https://www.pomerium.io/docs/identity-providers/azure.html
gitlab
Package gitlab implements OpenID Connect for Gitlab https://www.pomerium.io/docs/identity-providers/gitlab.html
Package gitlab implements OpenID Connect for Gitlab https://www.pomerium.io/docs/identity-providers/gitlab.html
google
Package google implements OpenID Connect for Google and GSuite.
Package google implements OpenID Connect for Google and GSuite.
okta
Package okta implements OpenID Connect for okta https://www.pomerium.io/docs/identity-providers/okta.html
Package okta implements OpenID Connect for okta https://www.pomerium.io/docs/identity-providers/okta.html
onelogin
Package onelogin implements OpenID Connect for OneLogin https://www.pomerium.io/docs/identity-providers/one-login.html
Package onelogin implements OpenID Connect for OneLogin https://www.pomerium.io/docs/identity-providers/one-login.html

Jump to

Keyboard shortcuts

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