Documentation ¶
Overview ¶
Package loginmodule provides functions related to user login.
Index ¶
- func Encode(data []byte, clientKey string) string
- func EncodeBody(requestParams map[string]string, clientID, clientKey string) (result []byte, err error)
- type Client
- func (client *Client) CreateUsers(ctx context.Context, clientID, clientKey string, params *CreateUsersParams) (bool, []CreateUsersResponseDataRow, error)
- func (client *Client) DeleteUsers(ctx context.Context, clientID, clientKey, loginPrefix string) (bool, error)
- func (client *Client) GetUserProfile(ctx context.Context, accessToken string) (profile map[string]interface{}, err error)
- func (client *Client) SendLTIResult(ctx context.Context, clientID, clientKey string, userLoginID, itemID int64, ...) (bool, error)
- func (client *Client) UnlinkClient(ctx context.Context, clientID, clientKey string, userLoginID int64) (bool, error)
- type CreateUsersParams
- type CreateUsersResponseDataRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client is the login module client.
func (*Client) CreateUsers ¶
func (client *Client) CreateUsers(ctx context.Context, clientID, clientKey string, params *CreateUsersParams, ) (bool, []CreateUsersResponseDataRow, error)
CreateUsers creates a batch of users in the login module.
func (*Client) DeleteUsers ¶
func (client *Client) DeleteUsers(ctx context.Context, clientID, clientKey, loginPrefix string) (bool, error)
DeleteUsers deletes users specified by the given login prefix from the login module.
func (*Client) GetUserProfile ¶
func (client *Client) GetUserProfile(ctx context.Context, accessToken string) (profile map[string]interface{}, err error)
GetUserProfile returns a user profile for given access token.
type CreateUsersParams ¶
type CreateUsersParams struct { Prefix string Amount int PostfixLength int PasswordLength int LoginFixed *bool Language *string }
CreateUsersParams represents parameters for Client.CreateUsers().
type CreateUsersResponseDataRow ¶
type CreateUsersResponseDataRow struct { ID int64 `json:"id"` Login string `json:"login"` Password string `json:"password"` }
CreateUsersResponseDataRow represents an element of the array returned by Client.CreateUsers() (id, login, password).
Click to show internal directories.
Click to hide internal directories.