server

package
v0.0.0-...-4e75552 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OA2Server

type OA2Server struct {
	Port    string
	Config  config.OA2Config
	Limiter middleware.RateLimiter
}

OA2Server implements an OAuth 2.0 server

func NewOA2Server

func NewOA2Server(port string, serverConfigPath string, ratePoliciesPath string) *OA2Server

NewOA2Server returns a new OAuth 2.0 server which runs on the specified port with the specified configuration

func (*OA2Server) SetRateLimiter

func (s *OA2Server) SetRateLimiter(policies []middleware.RatePolicy)

SetRateLimiter creates a new RateLimiter which enforces the policies passed.

func (*OA2Server) Start

func (s *OA2Server) Start()

Start sets up the static file server, handling routes and then starts listening for requests

Jump to

Keyboard shortcuts

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