Documentation
¶
Index ¶
- type Service
- func (s *Service) Authenticate() func(http.Handler) http.Handler
- func (s *Service) GetProvider() providers.OAuthProvider
- func (s *Service) OptionalAuthenticate() func(http.Handler) http.Handler
- func (s *Service) RegisterRoutes(mux *http.ServeMux)
- func (s *Service) WrapWithCors(handler http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents the OAuth service
func NewService ¶
func NewService(cfg *config.OAuthConfig, provider providers.OAuthProvider) (*Service, error)
NewService creates a new OAuth service
func (*Service) Authenticate ¶
Authenticate returns the authentication middleware
func (*Service) GetProvider ¶
func (s *Service) GetProvider() providers.OAuthProvider
GetProvider returns the configured auth provider
func (*Service) OptionalAuthenticate ¶
OptionalAuthenticate returns the optional authentication middleware
func (*Service) RegisterRoutes ¶
RegisterRoutes registers all OAuth-related routes
Click to show internal directories.
Click to hide internal directories.