oidcserver

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package oidcserver provides a stub of OpenID Connect provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Want     Want
	Response Response
}

Config represents a configuration of the OpenID Connect provider.

type Response

type Response struct {
	IDTokenExpiry                 time.Time
	RefreshToken                  string
	RefreshError                  string   // if set, Refresh() will return the error
	CodeChallengeMethodsSupported []string // optional
}

Response represents a set of response values.

type Server

type Server interface {
	IssuerURL() string
	SetConfig(Config)
	LastTokenResponse() *handler.TokenResponse
}

func New

func New(t *testing.T, k keypair.KeyPair, c Config) Server

New starts a HTTP server for the OpenID Connect provider.

type Want

type Want struct {
	Scope               string
	RedirectURIPrefix   string
	CodeChallengeMethod string            // optional
	ExtraParams         map[string]string // optional
	Username            string            // optional
	Password            string            // optional
	RefreshToken        string            // optional
}

Want represents a set of expected values.

Directories

Path Synopsis
Package handler provides a HTTP handler for the OpenID Connect Provider.
Package handler provides a HTTP handler for the OpenID Connect Provider.
Package http provides a http server running on localhost for testing.
Package http provides a http server running on localhost for testing.

Jump to

Keyboard shortcuts

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