Documentation
¶
Index ¶
- Variables
- func New(params provider.Params) (provider.Provider, error)
- type AuthChallenge
- type AuthToken
- type Provider
- func (p *Provider) Close()
- func (p *Provider) OpenObjectStore(name string, params provider.Params) (provider.ObjectStore, error)
- func (p *Provider) OpenQueue(name string, params provider.Params) (provider.Queue, error)
- func (p *Provider) OpenUserPool(name string, params provider.Params) (provider.UserPool, error)
- func (p *Provider) ProxyHTTP(handler http.Handler) error
- type User
- type UserPool
- func (p *UserPool) AuthenticateUser(username, password string) (provider.AuthToken, error)
- func (p *UserPool) AuthorizeToken(tokenString string, scopes ...[]string) (provider.AuthToken, error)
- func (p *UserPool) ChangeUserPassword(username, current, proposed string) error
- func (p *UserPool) CreateUser(username, password string, attributes map[string]string) (provider.User, error)
- func (p *UserPool) DeleteUser(username string) error
- func (p *UserPool) DisableUser(username string) error
- func (p *UserPool) GetUser(username string) (provider.User, error)
- func (p *UserPool) UpdateUser(username string, attributes map[string]string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidKey is returned when a public key is invalid ErrInvalidKey = errors.New("invalid public key") )
Functions ¶
Types ¶
type AuthChallenge ¶
func (*AuthChallenge) Error ¶
func (c *AuthChallenge) Error() string
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an AWS cloud provider
func (*Provider) OpenObjectStore ¶
func (p *Provider) OpenObjectStore(name string, params provider.Params) (provider.ObjectStore, error)
OpenObjectStore returns an instance to an S3 bucket
func (*Provider) OpenUserPool ¶
OpenUserPool returns a cognito user pool instance. This method takes the following required parameters:
client_id: the cognito client id public_keys: base64 encoded json string, retrieved from: https://cognito-idp.<region>.amazonaws.com/<pool_id>/.well-known/jwks.json
type User ¶
type User struct {
*cognitoidentityprovider.UserType
// contains filtered or unexported fields
}
func (*User) Attributes ¶
Attributes returns a map of user attributes
type UserPool ¶
type UserPool struct {
// contains filtered or unexported fields
}
func (*UserPool) AuthenticateUser ¶
AuthenticateUser authenticates the user and returns an AuthToken
func (*UserPool) AuthorizeToken ¶
func (p *UserPool) AuthorizeToken(tokenString string, scopes ...[]string) (provider.AuthToken, error)
AuthorizeToken takes the signed JWT string and validates it returning an AuthToken
func (*UserPool) ChangeUserPassword ¶
ChangeUserPassword changes the users password This method first attempt to authenticate the user to get a session token then it uses this token to perform the actual password change.
func (*UserPool) CreateUser ¶
func (p *UserPool) CreateUser(username, password string, attributes map[string]string) (provider.User, error)
CreateUser creates a new user
func (*UserPool) DeleteUser ¶
DeleteUser deletes a user record
func (*UserPool) DisableUser ¶
DisableUser disables a user account
Click to show internal directories.
Click to hide internal directories.