Documentation
¶
Index ¶
- type AuthClaims
- type Cache
- type CreateHandler
- type GetHandler
- type LinkHandler
- type ProviderUser
- type Service
- func (s Service[T, I]) Callback(w http.ResponseWriter, r *http.Request)
- func (s Service[T, I]) GetUser(ctx context.Context, r *http.Request) (model.User, error)
- func (s Service[T, I]) Logout(w http.ResponseWriter, r *http.Request)
- func (s Service[T, I]) Mux(prefix string, mux *http.ServeMux)
- func (s Service[T, I]) OnUnauthorized(w http.ResponseWriter, r *http.Request, err error)
- func (s Service[T, I]) Register(w http.ResponseWriter, r *http.Request)
- type State
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClaims ¶
type CreateHandler ¶
type CreateHandler[T ProviderUser[I], I comparable] func(ctx context.Context, invite model.User, user T) (model.User, error)
type GetHandler ¶
type ProviderUser ¶
type ProviderUser[I comparable] interface { GetID() I }
type Service ¶
type Service[T ProviderUser[I], I comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[T ProviderUser[I], I comparable](name, getURL, onSuccessPath string, config oauth2.Config, cache Cache, storage Storage, linkHandler LinkHandler, createHandler CreateHandler[T, I], getHandler GetHandler[I], renderer *renderer.Service, cookie cookie.Service) Service[T, I]
func (Service[T, I]) Callback ¶
func (s Service[T, I]) Callback(w http.ResponseWriter, r *http.Request)
func (Service[T, I]) OnUnauthorized ¶
Click to show internal directories.
Click to hide internal directories.