Documentation ¶
Index ¶
- func EnsureIdentity(tx *gorm.DB, id *types.Identity, role types2.Role) (*types.User, error)
- type Client
- func (c *Client) Close() error
- func (c *Client) EnsureIdentity(ctx context.Context, id *types.Identity) (*types.User, error)
- func (c *Client) UpdateProfileIconIfNeeded(ctx context.Context, user *types.User, authProviderID uint) error
- func (c *Client) User(ctx context.Context, username string) (*types.User, error)
- type UserDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnsureIdentity ¶
EnsureIdentity ensures that the given identity exists in the database, and returns the user associated with it.
func (*Client) UpdateProfileIconIfNeeded ¶
type UserDecorator ¶
type UserDecorator struct { Next authenticator.Request Client *Client }
func NewUserDecorator ¶
func NewUserDecorator(next authenticator.Request, client *Client) *UserDecorator
func (UserDecorator) AuthenticateRequest ¶
func (u UserDecorator) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)
Click to show internal directories.
Click to hide internal directories.