Documentation ¶
Overview ¶
Package cli adds support for command line interfaces or micro-services to establish an access and/or refresh token via user participation.
Index ¶
- func RegisterFactory(store storage.Store, path string, crypt kms.Encryption, ...) *handlerfactory.Options
- type AcceptHandler
- type AuthHandler
- type RegisterHandler
- func (h *RegisterHandler) CheckIntegrity(*http.Request) *status.Status
- func (h *RegisterHandler) Get(r *http.Request, name string) (proto.Message, error)
- func (h *RegisterHandler) LookupItem(r *http.Request, name string, vars map[string]string) bool
- func (h *RegisterHandler) NormalizeInput(r *http.Request, name string, vars map[string]string) error
- func (h *RegisterHandler) Patch(r *http.Request, name string) (proto.Message, error)
- func (h *RegisterHandler) Post(r *http.Request, name string) (proto.Message, error)
- func (h *RegisterHandler) Put(r *http.Request, name string) (proto.Message, error)
- func (h *RegisterHandler) Remove(r *http.Request, name string) (proto.Message, error)
- func (h *RegisterHandler) Save(r *http.Request, tx storage.Tx, name string, vars map[string]string, ...) error
- func (h *RegisterHandler) Setup(r *http.Request, tx storage.Tx) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFactory ¶
func RegisterFactory(store storage.Store, path string, crypt kms.Encryption, cliAuthURL, issuerURL, authURL, tokenURL, accept string, httpClient *http.Client) *handlerfactory.Options
RegisterFactory creates handlers for shell login requests.
Types ¶
type AcceptHandler ¶
type AcceptHandler struct {
// contains filtered or unexported fields
}
AcceptHandler handles one CLI auth request.
func NewAcceptHandler ¶
func NewAcceptHandler(store storage.Store, crypt kms.Encryption, rootPath string) (*AcceptHandler, error)
NewAcceptHandler creates a new AcceptHandler.
func (*AcceptHandler) Handle ¶
func (h *AcceptHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle handles an accept redirect request.
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
AuthHandler handles one CLI auth request.
func NewAuthHandler ¶
func NewAuthHandler(store storage.Store) *AuthHandler
NewAuthHandler creates a new AuthHandler.
func (*AuthHandler) Handle ¶
func (h *AuthHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle handles a CLI authentication request.
type RegisterHandler ¶
type RegisterHandler struct {
// contains filtered or unexported fields
}
RegisterHandler handles shell login requests.
func NewRegisterHandler ¶
func NewRegisterHandler(store storage.Store, crypt kms.Encryption, cliAuthURL, issuerURL, authURL, tokenURL, accept string, httpClient *http.Client) *RegisterHandler
NewRegisterHandler handles one shell login request.
func (*RegisterHandler) CheckIntegrity ¶
func (h *RegisterHandler) CheckIntegrity(*http.Request) *status.Status
CheckIntegrity checks that any modifications make sense before applying them.
func (*RegisterHandler) LookupItem ¶
LookupItem looks up the item in the storage layer.
func (*RegisterHandler) NormalizeInput ¶
func (h *RegisterHandler) NormalizeInput(r *http.Request, name string, vars map[string]string) error
NormalizeInput sets up basic structure of request input objects if absent.