pkg

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallbackHandler

func CallbackHandler(c oauth2.Config) func(rw http.ResponseWriter, req *http.Request)

func ClientEndpoint

func ClientEndpoint(c clientcredentials.Config) func(rw http.ResponseWriter, req *http.Request)

func HomeHandler

func HomeHandler(c oauth2.Config) func(rw http.ResponseWriter, req *http.Request)

func OwnerHandler

func OwnerHandler(c oauth2.Config) func(rw http.ResponseWriter, req *http.Request)

Types

type Store

type Store struct {
	Clients        map[string]*fosite.DefaultClient
	AuthorizeCodes map[string]fosite.Requester
	IDSessions     map[string]fosite.Requester
	AccessTokens   map[string]fosite.Requester
	Implicit       map[string]fosite.Requester
	RefreshTokens  map[string]fosite.Requester
	Users          map[string]UserRelation
}

func NewExampleStore

func NewExampleStore() *Store

func NewStore

func NewStore() *Store

func (*Store) Authenticate

func (s *Store) Authenticate(_ context.Context, name string, secret string) error

func (*Store) CreateAccessTokenSession

func (s *Store) CreateAccessTokenSession(_ context.Context, signature string, req fosite.Requester) error

func (*Store) CreateAuthorizeCodeSession

func (s *Store) CreateAuthorizeCodeSession(_ context.Context, code string, req fosite.Requester) error

func (*Store) CreateImplicitAccessTokenSession

func (s *Store) CreateImplicitAccessTokenSession(_ context.Context, code string, req fosite.Requester) error

func (*Store) CreateOpenIDConnectSession

func (s *Store) CreateOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) error

func (*Store) CreateRefreshTokenSession

func (s *Store) CreateRefreshTokenSession(_ context.Context, signature string, req fosite.Requester) error

func (*Store) DeleteAccessTokenSession

func (s *Store) DeleteAccessTokenSession(_ context.Context, signature string) error

func (*Store) DeleteAuthorizeCodeSession

func (s *Store) DeleteAuthorizeCodeSession(_ context.Context, code string) error

func (*Store) DeleteOpenIDConnectSession

func (s *Store) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error

func (*Store) DeleteRefreshTokenSession

func (s *Store) DeleteRefreshTokenSession(_ context.Context, signature string) error

func (*Store) GetAccessTokenSession

func (s *Store) GetAccessTokenSession(_ context.Context, signature string, _ interface{}) (fosite.Requester, error)

func (*Store) GetAuthorizeCodeSession

func (s *Store) GetAuthorizeCodeSession(_ context.Context, code string, _ interface{}) (fosite.Requester, error)

func (*Store) GetClient

func (s *Store) GetClient(id string) (fosite.Client, error)

func (*Store) GetOpenIDConnectSession

func (s *Store) GetOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) (fosite.Requester, error)

func (*Store) GetRefreshTokenSession

func (s *Store) GetRefreshTokenSession(_ context.Context, signature string, _ interface{}) (fosite.Requester, error)

func (*Store) PersistAuthorizeCodeGrantSession

func (s *Store) PersistAuthorizeCodeGrantSession(ctx context.Context, authorizeCode, accessSignature, refreshSignature string, request fosite.Requester) error

func (*Store) PersistRefreshTokenGrantSession

func (s *Store) PersistRefreshTokenGrantSession(ctx context.Context, originalRefreshSignature, accessSignature, refreshSignature string, request fosite.Requester) error

type UserRelation

type UserRelation struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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