Documentation ¶
Index ¶
- type AccessGenerator
- type AdapterClientStore
- type JWTAccessClaims
- type Keychain
- type Server
- func (s *Server) GetECPrivateKey() *ecdsa.PrivateKey
- func (s *Server) GetECPublicKey() *ecdsa.PublicKey
- func (s *Server) GetECPublicKeyID() string
- func (s *Server) HandleAuthorizeRequest(uid int64, w nethttp.ResponseWriter, r *nethttp.Request) error
- func (s *Server) HandleTokenRequest(w nethttp.ResponseWriter, r *nethttp.Request) error
- func (s *Server) NewAccessGenerator(k kv.KV, issuer string, method jwt.SigningMethod) (*AccessGenerator, error)
- func (s *Server) SetUserAuthorizationHandler(h server.UserAuthorizationHandler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessGenerator ¶
type AccessGenerator struct { Issuer string SignedKeyID string SignedKey *ecdsa.PrivateKey SignedMethod jwt.SigningMethod // contains filtered or unexported fields }
AccessGenerator generate the jwt access token.
type AdapterClientStore ¶
type AdapterClientStore struct {
// contains filtered or unexported fields
}
AdapterClientStore adapts our database interface to the client store interface.
func NewAdapterClientStore ¶
func NewAdapterClientStore(d db.DB, t *token.Tokenizer) *AdapterClientStore
NewAdapterClientStore creates a new client store adapter.
type JWTAccessClaims ¶
type JWTAccessClaims struct { jwt.StandardClaims Nonce string `json:"nonce,omitempty"` }
JWTAccessClaims jwt claims.
type Keychain ¶
type Keychain struct {
// contains filtered or unexported fields
}
Keychain holds signing keys for.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an oauth server.
func (*Server) GetECPrivateKey ¶
func (s *Server) GetECPrivateKey() *ecdsa.PrivateKey
GetECPrivateKey returns an ecdsa.PrivateKey.
func (*Server) GetECPublicKey ¶
GetECPublicKey returns a crypto.PublicKey compatable version of the public key.
func (*Server) GetECPublicKeyID ¶
GetECPublicKeyID returns the generated.
func (*Server) HandleAuthorizeRequest ¶
func (s *Server) HandleAuthorizeRequest(uid int64, w nethttp.ResponseWriter, r *nethttp.Request) error
HandleAuthorizeRequest passes an authorize request to the oauth server.
func (*Server) HandleTokenRequest ¶
HandleTokenRequest passes a token request to the oauth server.
func (*Server) NewAccessGenerator ¶
func (s *Server) NewAccessGenerator(k kv.KV, issuer string, method jwt.SigningMethod) (*AccessGenerator, error)
NewAccessGenerator creates a new access token generator.
func (*Server) SetUserAuthorizationHandler ¶
func (s *Server) SetUserAuthorizationHandler(h server.UserAuthorizationHandler)
SetUserAuthorizationHandler sets the UserAuthorizationHandler on the OAuth server.