oidc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MockGetUserUser contains a possible mocked GetUser User
	MockGetUserUser *User
	// MockGetUserError contains a possible mocked GetUser error
	MockGetUserError error
)

Functions

func Setup

func Setup(conf config.Config, r *mux.Router) error

Setup configured the OpenID Connect endpoint handlers.

Types

type User

type User struct {
	ExternalID    string `json:"sub"`
	Name          string `json:"name"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
}

User defines an OpenID Connect user object.

func GetUser

func GetUser(ctx context.Context, code string, state string) (User, error)

GetUser returns the OpenID Connect user object for the given code and state.

Jump to

Keyboard shortcuts

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