Skip to content

Add oidctest package #345

@ericchiang

Description

@ericchiang

Currently it's pretty hard to write a unit test for this package. Consider adding a wrapper around https://pkg.go.dev/net/http/httptest that spins up a minimal server.

package oidctest

type Server struct {
    PublicKeys []crypto.PublicKey
    SigningKey crypto.PrivateKey
    // ... other configuration
}

type Claims struct {
    // ... fields
}

func (s *Server) Start()
func (s *Server) Close()
func (s *Server) NewIDToken(claims *Claims) string
func (s *Server) NewProvider() *oidc.Provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions