Documentation
¶
Index ¶
- type Auth
- func (a *Auth) Callback(code string) *oauth2.Token
- func (a *Auth) CreateAdminUser() error
- func (a *Auth) CreateSessionCookie(sessionID string) *http.Cookie
- func (a *Auth) LoginUser(ctx context.Context, username, password string) (string, error)
- func (a *Auth) OAuthLogin() string
- func (a *Auth) RegisterUser(ctx context.Context, register *api.RegisterRequest) (string, error)
- func (a *Auth) UserBySession(ctx context.Context, sessionID string) (*api.User, error)
- type ErrSessionExpired
- type ErrUserCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) CreateAdminUser ¶
func (*Auth) CreateSessionCookie ¶
func (*Auth) OAuthLogin ¶
OAuthLogin uses OAuth2 to authenticate the user This will probably work as register and login, right???
func (*Auth) RegisterUser ¶
we will probably remove this, and init everything with an admin user which can create users instead .... I guess we can keep it for that thouugh doesnt' make much sense to have a register outside anyways
type ErrSessionExpired ¶
type ErrSessionExpired struct{}
func (ErrSessionExpired) Error ¶
func (ErrSessionExpired) Error() string
func (ErrSessionExpired) Is ¶
func (ErrSessionExpired) Is(target error) bool
type ErrUserCredentials ¶
type ErrUserCredentials struct{}
func (ErrUserCredentials) Error ¶
func (ErrUserCredentials) Error() string
func (ErrUserCredentials) Is ¶
func (ErrUserCredentials) Is(target error) bool
Click to show internal directories.
Click to hide internal directories.