Documentation
¶
Overview ¶
Package classification Virtual Security Module
User Management and Authentication API
BasePath: /
swagger:meta
Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause
Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause
Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause
Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause
Index ¶
- Constants
- Variables
- type AuthnManager
- func (authNManager *AuthnManager) Close() error
- func (authnManager *AuthnManager) CreateUser(ctx gocontext.Context, userEntry *model.UserEntry) (string, error)
- func (authnManager *AuthnManager) DeleteUser(ctx gocontext.Context, username string) error
- func (authnManager *AuthnManager) GetUser(ctx gocontext.Context, username string) (*model.UserEntry, error)
- func (authNManager *AuthnManager) HandlePre(w http.ResponseWriter, r *http.Request) *http.Request
- func (authnManager *AuthnManager) Init(moduleInitContext *context.ModuleInitContext) error
- func (authnManager *AuthnManager) Login(l *model.LoginRequest) (string, error)
- func (authnManager *AuthnManager) RegisterEndpoints(mux *denco.Mux) []denco.Handler
- func (authnManager *AuthnManager) Type() string
- type AuthnProvider
- type BuiltinChallenge
- func (challenge *BuiltinChallenge) Decode(encodedChallenge []byte) error
- func (challenge *BuiltinChallenge) Encode() ([]byte, error)
- func (challenge *BuiltinChallenge) Equal(challenge2 *BuiltinChallenge) bool
- func (challenge *BuiltinChallenge) Expired() bool
- func (challenge *BuiltinChallenge) Valid() bool
- type BuiltinProvider
- func (p *BuiltinProvider) Authenticated(r *http.Request) (username string, e error)
- func (p *BuiltinProvider) CreateUser(userEntry *model.UserEntry) (string, error)
- func (p *BuiltinProvider) DeleteUser(username string) error
- func (p *BuiltinProvider) GetUser(username string) (*model.UserEntry, error)
- func (p *BuiltinProvider) Init(config *config.Config, ds vds.DataStoreAdapter, ks *vks.VirtualKeyStore) error
- func (p *BuiltinProvider) Login(l *model.LoginRequest) (token string, e error)
- func (p *BuiltinProvider) Type() string
- type LoginParam
- type LoginResp
- type UserCreationResponse
- type UserEntryParam
- type UserEntryResponse
Constants ¶
View Source
const ( HeaderNameAuth = "Authorization" LoginPath = "/login" UsersPath = "/users" )
View Source
const FIXED = "builtin-challenge"
Variables ¶
View Source
var AuthnProviderRegistrar *authnProviderRegistrar = newRegistrar()
singleton registrar for authN providers
Functions ¶
This section is empty.
Types ¶
type AuthnManager ¶
type AuthnManager struct {
// contains filtered or unexported fields
}
func New ¶
func New() *AuthnManager
func (*AuthnManager) Close ¶
func (authNManager *AuthnManager) Close() error
func (*AuthnManager) CreateUser ¶
func (*AuthnManager) DeleteUser ¶
func (authnManager *AuthnManager) DeleteUser(ctx gocontext.Context, username string) error
func (*AuthnManager) HandlePre ¶
func (authNManager *AuthnManager) HandlePre(w http.ResponseWriter, r *http.Request) *http.Request
func (*AuthnManager) Init ¶
func (authnManager *AuthnManager) Init(moduleInitContext *context.ModuleInitContext) error
func (*AuthnManager) Login ¶
func (authnManager *AuthnManager) Login(l *model.LoginRequest) (string, error)
func (*AuthnManager) RegisterEndpoints ¶
func (authnManager *AuthnManager) RegisterEndpoints(mux *denco.Mux) []denco.Handler
func (*AuthnManager) Type ¶
func (authnManager *AuthnManager) Type() string
type AuthnProvider ¶
type AuthnProvider interface {
Init(*config.Config, vds.DataStoreAdapter, *vks.VirtualKeyStore) error
Authenticated(r *http.Request) (username string, e error)
Login(l *model.LoginRequest) (token string, e error)
CreateUser(*model.UserEntry) (string, error)
DeleteUser(username string) error
GetUser(username string) (*model.UserEntry, error)
Type() string
}
type BuiltinChallenge ¶
func NewBuiltinChallenge ¶
func NewBuiltinChallenge(username string) (*BuiltinChallenge, error)
func NewFakeBuiltinChallenge ¶
func NewFakeBuiltinChallenge(username string) (*BuiltinChallenge, error)
func (*BuiltinChallenge) Decode ¶
func (challenge *BuiltinChallenge) Decode(encodedChallenge []byte) error
func (*BuiltinChallenge) Encode ¶
func (challenge *BuiltinChallenge) Encode() ([]byte, error)
func (*BuiltinChallenge) Equal ¶
func (challenge *BuiltinChallenge) Equal(challenge2 *BuiltinChallenge) bool
func (*BuiltinChallenge) Expired ¶
func (challenge *BuiltinChallenge) Expired() bool
func (*BuiltinChallenge) Valid ¶
func (challenge *BuiltinChallenge) Valid() bool
type BuiltinProvider ¶
type BuiltinProvider struct {
// contains filtered or unexported fields
}
func NewBuiltinProvider ¶
func NewBuiltinProvider() *BuiltinProvider
func (*BuiltinProvider) Authenticated ¶
func (p *BuiltinProvider) Authenticated(r *http.Request) (username string, e error)
func (*BuiltinProvider) CreateUser ¶
func (p *BuiltinProvider) CreateUser(userEntry *model.UserEntry) (string, error)
func (*BuiltinProvider) DeleteUser ¶
func (p *BuiltinProvider) DeleteUser(username string) error
func (*BuiltinProvider) GetUser ¶
func (p *BuiltinProvider) GetUser(username string) (*model.UserEntry, error)
func (*BuiltinProvider) Init ¶
func (p *BuiltinProvider) Init(config *config.Config, ds vds.DataStoreAdapter, ks *vks.VirtualKeyStore) error
func (*BuiltinProvider) Login ¶
func (p *BuiltinProvider) Login(l *model.LoginRequest) (token string, e error)
func (*BuiltinProvider) Type ¶
func (p *BuiltinProvider) Type() string
type LoginParam ¶
type LoginParam struct {
// in:body
LoginReq model.LoginRequest
}
swagger:parameters Login
type LoginResp ¶
type LoginResp struct {
// in:body
LoginResp model.LoginResponse
}
swagger:response LoginResp
type UserCreationResponse ¶
type UserCreationResponse struct {
// in:body
Body struct {
UserId string
}
}
swagger:response UserCreationResponse
type UserEntryParam ¶
swagger:parameters CreateUser
type UserEntryResponse ¶
swagger:response UserEntryResponse
Click to show internal directories.
Click to hide internal directories.