Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpired = errors.New("token expired")
ErrExpired is returned when the user tries to autneticate with an expired token.
Functions ¶
Types ¶
type ContextOpt ¶
type ContextOpt func(*Info)
ContextOpt values are passed to auth.Context to construct an auth.Info object
func Admin ¶
func Admin(isAdmin bool) ContextOpt
Admin is passed as an argument to Context to set the auth.Info's IsAdmin flag
func ID ¶
func ID(id string) ContextOpt
ID is passed as an argument to Context to set the auth.Info's ID
type FirebaseProvider ¶
FirebaseProvider is an auth provider backed by Firebase Authentication
func (*FirebaseProvider) FromRequest ¶
func (f *FirebaseProvider) FromRequest(r *http.Request) (Info, error)
FromRequest parses an Authorization header or Cookie as a Firebase JWT token.
Click to show internal directories.
Click to hide internal directories.