Documentation ¶
Overview ¶
Package server provides an http oauth REST API
Index ¶
- Constants
- Variables
- type Option
- func AllowPasswordGrant(allow bool) Option
- func AllowSignup(allow bool) Option
- func CodeStore(store oauth.CodeStore) Option
- func SessionCookieKeys(hash, block []byte) Option
- func SessionCookieName(name string) Option
- func SessionIntervals(lifetime, timeout time.Duration) Option
- func SessionStore(store sessions.Store) Option
- type Server
Constants ¶
View Source
const ( // Name the server name Name = "libatomic-oauth" // Version is the binary version Version = "1.0.0" )
View Source
const (
// AuthRequestParam is the name of the request token parameter
AuthRequestParam = "request_token"
)
Variables ¶
View Source
var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage SpecDoc *loads.Document )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(s *Server)
Option provides the server options, these will override th defaults and instance values.
func AllowPasswordGrant ¶
AllowPasswordGrant enables password grants which require client secrets
func AllowSignup ¶
AllowSignup enables the signup/register paths
func SessionCookieKeys ¶
SessionCookieKeys sets the session cookie keys
func SessionCookieName ¶
SessionCookieName sets the session cookie name
func SessionIntervals ¶
SessionIntervals sets the session lifetime and activity timeout
func SessionStore ¶
SessionStore sets the session store
type Server ¶
Server is an API server it can be used standalone vi Server() or integrared via Handler()
func New ¶
func New(ctrl oauth.Controller, athr oauth.Authorizer, opts ...interface{}) *Server
New returns a new Server instance
Click to show internal directories.
Click to hide internal directories.