Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessResponseData ¶
type Authorize ¶
type Authorize interface {
Authorization(req *osin.AuthorizeRequest) (*osin.AuthorizeData, error)
}
func NewAuthorize ¶
func NewAuthorize(s *SimpleServer) Authorize
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
}
Click to show internal directories.
Click to hide internal directories.