server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Issuer    string
	Subject   string
	Audience  string
	ID        string
	Port      int
	Expires   time.Duration
	Email     string
	GrandType string
}

type FakeClaims

type FakeClaims struct {
	jwt.RegisteredClaims
	GrantType string `json:"grant_type,omitempty"`
	Email     string `json:"email,omitempty"`
}

type FakeJWTServer

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

func NewFakeJwtServer

func NewFakeJwtServer() *FakeJWTServer

func (*FakeJWTServer) JwksHandler

func (f *FakeJWTServer) JwksHandler(writer http.ResponseWriter, request *http.Request)

func (*FakeJWTServer) Serve

func (f *FakeJWTServer) Serve() error

func (*FakeJWTServer) TokenHandler

func (f *FakeJWTServer) TokenHandler(writer http.ResponseWriter, request *http.Request)

func (*FakeJWTServer) WithAudience

func (f *FakeJWTServer) WithAudience(audience string) *FakeJWTServer

func (*FakeJWTServer) WithEmail

func (f *FakeJWTServer) WithEmail(email string) *FakeJWTServer

func (*FakeJWTServer) WithExpires

func (f *FakeJWTServer) WithExpires(expires time.Duration) *FakeJWTServer

func (*FakeJWTServer) WithGrandType

func (f *FakeJWTServer) WithGrandType(grantType string) *FakeJWTServer

func (*FakeJWTServer) WithID

func (f *FakeJWTServer) WithID(id string) *FakeJWTServer

func (*FakeJWTServer) WithIssuer

func (f *FakeJWTServer) WithIssuer(issuer string) *FakeJWTServer

func (*FakeJWTServer) WithPort

func (f *FakeJWTServer) WithPort(port int) *FakeJWTServer

func (*FakeJWTServer) WithSubject

func (f *FakeJWTServer) WithSubject(subject string) *FakeJWTServer

type TokenResponse

type TokenResponse struct {
	Message     string `json:"message"`
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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