oidcserver

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package oidcserver provides a minimal mock OIDC server for e2e testing. It implements three endpoints:

  • /.well-known/openid-configuration (discovery)
  • /jwks (JSON Web Key Set)
  • /token (client_credentials grant)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

func WithAudience

func WithAudience(aud string) Option

func WithBindPort

func WithBindPort(port int) Option

func WithClientCredentials

func WithClientCredentials(id, secret string) Option

func WithExpiresIn

func WithExpiresIn(seconds int) Option

func WithSubject

func WithSubject(sub string) Option

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Server

func (*Server) BindAddr

func (s *Server) BindAddr() string

func (*Server) BindPort

func (s *Server) BindPort() int

func (*Server) Close

func (s *Server) Close() error

func (*Server) Issuer

func (s *Server) Issuer() string

func (*Server) Run

func (s *Server) Run() error

func (*Server) TokenEndpoint

func (s *Server) TokenEndpoint() string

func (*Server) TokenRequestCount

func (s *Server) TokenRequestCount() int64

TokenRequestCount returns the number of successful token requests served.

Jump to

Keyboard shortcuts

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