registry

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpired = errors.New("Token is expired")

Functions

This section is empty.

Types

type ClientAuthorizationGrantChecker

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

func (*ClientAuthorizationGrantChecker) HasAuthorizedClient

func (c *ClientAuthorizationGrantChecker) HasAuthorizedClient(user api.UserInfo, grant *api.Grant) (approved bool, err error)

type TokenAuthenticator

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

func NewTokenAuthenticator

func NewTokenAuthenticator(registry accesstoken.Registry) *TokenAuthenticator

func (*TokenAuthenticator) AuthenticateToken

func (a *TokenAuthenticator) AuthenticateToken(value string) (api.UserInfo, bool, error)

type UserConversion

type UserConversion struct{}

func NewUserConversion

func NewUserConversion() *UserConversion

NewUserConversion creates an object that can convert the UserInfo object to and from an oauth access/authorize token object.

func (*UserConversion) ConvertFromAccessToken

func (s *UserConversion) ConvertFromAccessToken(token *oapi.OAuthAccessToken) (interface{}, error)

func (*UserConversion) ConvertFromAuthorizeToken

func (s *UserConversion) ConvertFromAuthorizeToken(token *oapi.OAuthAuthorizeToken) (interface{}, error)

func (*UserConversion) ConvertToAccessToken

func (s *UserConversion) ConvertToAccessToken(user interface{}, token *oapi.OAuthAccessToken) error

func (*UserConversion) ConvertToAuthorizeToken

func (s *UserConversion) ConvertToAuthorizeToken(user interface{}, token *oapi.OAuthAuthorizeToken) error

Jump to

Keyboard shortcuts

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