testserver

package
v0.0.0-...-5aa0ff3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UAA

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

UAA is a fake implementation of the UAA HTTP service.

func NewUAA

func NewUAA() *UAA

NewUAA returns a new UAA initialized with the given Config.

func (*UAA) Close

func (s *UAA) Close()

Close will cause the HTTP server to stop serving requests and close its connection.

func (*UAA) PrivateKey

func (s *UAA) PrivateKey() string

func (*UAA) PublicKey

func (s *UAA) PublicKey() string

func (*UAA) Reset

func (s *UAA) Reset()

Reset will clear all internal resource state within the server. This means that all users, clients, and groups will be deleted.

func (*UAA) ResetDefaultScopes

func (s *UAA) ResetDefaultScopes()

ResetDefaultScopes resets the default scopes back to their original values.

func (*UAA) SetDefaultScopes

func (s *UAA) SetDefaultScopes(scopes []string)

SetDefaultScopes allows the default scopes applied to a user to be configured.

func (*UAA) Start

func (s *UAA) Start()

Start will cause the HTTP server to bind to a port and start serving requests.

func (*UAA) URL

func (s *UAA) URL() string

URL returns the url that the server is hosted on.

func (*UAA) UserTokenFor

func (s *UAA) UserTokenFor(userID string, scopes, audiences []string) string

UserTokenFor returns a user token with the given id, scopes, and audiences.

Jump to

Keyboard shortcuts

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