Documentation ¶
Index ¶
- func FirebaseMiddleware(v FirebaseTokenVerifier) func(http.Handler) http.Handler
- func NewContext(ctx context.Context, a Auth) context.Context
- func NewFirebaseAuthClient(firebaseProjectID string) (*firebaseauth.Client, error)
- func SEP10Middleware(issuer string, ks jose.JSONWebKeySet) func(http.Handler) http.Handler
- type Auth
- type FirebaseTokenVerifier
- type FirebaseTokenVerifierFunc
- type FirebaseTokenVerifierLive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirebaseMiddleware ¶
func FirebaseMiddleware(v FirebaseTokenVerifier) func(http.Handler) http.Handler
func NewContext ¶
NewContext returns a new context that is a copy of the given context with the auth details set within. An Auth can be retrieved from the context using FromContext.
func NewFirebaseAuthClient ¶
func NewFirebaseAuthClient(firebaseProjectID string) (*firebaseauth.Client, error)
Types ¶
type FirebaseTokenVerifier ¶
type FirebaseTokenVerifier interface {
Verify(r *http.Request) (*firebaseauth.Token, bool)
}
type FirebaseTokenVerifierFunc ¶
type FirebaseTokenVerifierFunc func(r *http.Request) (*firebaseauth.Token, bool)
func (FirebaseTokenVerifierFunc) Verify ¶
func (v FirebaseTokenVerifierFunc) Verify(r *http.Request) (*firebaseauth.Token, bool)
type FirebaseTokenVerifierLive ¶
type FirebaseTokenVerifierLive struct {
AuthClient *firebaseauth.Client
}
func (FirebaseTokenVerifierLive) Verify ¶
func (v FirebaseTokenVerifierLive) Verify(r *http.Request) (*firebaseauth.Token, bool)
Click to show internal directories.
Click to hide internal directories.