oidc

package
v0.0.0-...-b0db392 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package oidc defines types for OpenID Connect

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Google

type Google struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	SessionStore sessions.Store
}

Google represents an OpenID Connect client for http://accounts.google.com

func (*Google) Callback

func (o *Google) Callback(w http.ResponseWriter, r *http.Request) (user map[string]string, err error)

Callback handles the callback from the user after the identity provider provided a code to the users agent

func (*Google) NewAuth

func (o *Google) NewAuth(w http.ResponseWriter, r *http.Request)

NewAuth initializes a new OpenID Connect Session and redirects the user

type Paypal

type Paypal struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	SessionStore sessions.Store
}

Paypal is not fully OIDC compliant, therefor it's not possible to verify the id_token HMAC See: https://groups.google.com/forum/#!topic/mod_auth_openidc/fPc_C8rb9ns

func (*Paypal) Callback

func (o *Paypal) Callback(w http.ResponseWriter, r *http.Request) (user map[string]string, err error)

Callback handles the callback from the user after the identity provider provided a code to the users agent

func (*Paypal) NewAuth

func (o *Paypal) NewAuth(w http.ResponseWriter, r *http.Request)

NewAuth initializes a new OpenID Connect Session and redirects the user

type Provider

type Provider interface {
	// NewAuth starts a new OIDC authentication and redirects the user to the identity provider
	NewAuth(w http.ResponseWriter, r *http.Request)
	// Callback receives the callback from the identity provider, verifies it and requests user data
	Callback(w http.ResponseWriter, r *http.Request) (user map[string]string, err error)
}

Provider represents an OpenID Connect client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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