Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) CreateToken(ctx context.Context, name string) (*core.OAuthToken, error)
- func (s *Service) DeleteToken(ctx context.Context, token *core.OAuthToken) error
- func (s *Service) ListTokens(ctx context.Context) ([]*core.OAuthToken, error)
- func (s *Service) Validate(r *http.Request) (*core.User, error)
- func (s *Service) WithUser(ctx context.Context, user *core.User) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPermissionDeny = errors.New("no permission")
ErrPermissionDeny of an operation
View Source
var ErrTokenOwnerNotFound = errors.New("requires token owner")
ErrTokenOwnerNotFound in context
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service of OAuth
func NewService ¶
func NewService( config *config.Config, oauthStore core.OAuthStore, userStore core.UserStore, ) *Service
NewService for OAuth
func (*Service) CreateToken ¶
CreateToken with name. Required context with User.
func (*Service) DeleteToken ¶
DeleteToken with access code
func (*Service) ListTokens ¶
ListTokens of token owner
Click to show internal directories.
Click to hide internal directories.