auth
auth/config.go
Update token test for revocation and new properties. Add the new properties of Token to the compareTokens helper so they're tested for equality. Add a test for revoking tokens. We still need a test that checks revoking tokens by their refresh token.
1 package auth
3 import (
4 "errors"
5 "html/template"
6 )
8 var (
9 // ErrInvalidLoginURI is returned when a Context is instantiated with a Config object that specifies a LoginURI that can't be parsed as a URL.
10 ErrInvalidLoginURI = errors.New("invalid login URI")
11 )
13 // Config holds the configuration values necessary to run a server. A Config
14 // instance is the only way to instantiate a Context variable.
15 type Config struct {
16 ClientStore clientStore
17 AuthCodeStore authorizationCodeStore
18 ProfileStore profileStore
19 TokenStore tokenStore
20 SessionStore sessionStore
21 Template *template.Template
22 LoginURI string
23 iterations int
24 }