osin2simple

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

osin2simple

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessResponseData

type AccessResponseData struct {
	AccessToken  string
	RefreshToken string
	ExpiresIn    int32
	Scope        string
	UserData     interface{}
}

type Authorize

type Authorize interface {
	Authorization(req *osin.AuthorizeRequest) (*osin.AuthorizeData, error)
}

func NewAuthorize

func NewAuthorize(s *SimpleServer) Authorize

type Client

type Client interface {
}

type Info

type Info interface {
	Info(req *osin.InfoRequest) (*AccessResponseData, error)
}

type RequestValidate

type RequestValidate interface {
	Validate() error
}

type SimpleAccess

type SimpleAccess interface {
	Access(req *osin.AccessRequest) (*AccessResponseData, error)
	GenAccessData(req *osin.AccessRequest) (*osin.AccessData, error)
}

func NewSimpleAccess

func NewSimpleAccess(s *SimpleServer) SimpleAccess

type SimpleConfig

type SimpleConfig struct {
	*osin.ServerConfig
	AuthorizeTokenGen osin.AuthorizeTokenGen
	AccessTokenGen    osin.AccessTokenGen
	Logger            osin.Logger
}

func NewServerConfig

func NewServerConfig() *SimpleConfig

type SimpleServer

type SimpleServer struct {
	Config            *osin.ServerConfig
	Storage           osin.Storage
	AuthorizeTokenGen osin.AuthorizeTokenGen
	AccessTokenGen    osin.AccessTokenGen
	Access            SimpleAccess
	Now               func() time.Time
	Logger            osin.Logger
}

Server is an OAuth2 implementation

func NewSimpleServer

func NewSimpleServer(config *SimpleConfig, storage osin.Storage) *SimpleServer

NewServer creates a new server instance

type ValidateRequest

type ValidateRequest interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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