Documentation ¶
Index ¶
- func CheckUserAccess(teamNames []string, u *User) bool
- func GetTeamsNames(teams []Team) []string
- type AuthenticationFailure
- type Key
- type Team
- type Token
- type User
- func (u *User) AddKey(key Key) error
- func (u *User) AllowedApps() ([]string, error)
- func (u *User) AllowedAppsByTeam(team string) ([]string, error)
- func (u *User) CheckPassword(password string) error
- func (u *User) Create() error
- func (u *User) CreateToken(password string) (*Token, error)
- func (u *User) FindKey(key Key) (Key, int)
- func (u *User) HasKey(key Key) bool
- func (u *User) HashPassword()
- func (u *User) IsAdmin() bool
- func (u *User) RemoveKey(key Key) error
- func (u *User) Teams() (teams []Team, err error)
- func (u *User) Update() error
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUserAccess ¶
func GetTeamsNames ¶
Types ¶
type AuthenticationFailure ¶
type AuthenticationFailure struct{}
func (AuthenticationFailure) Error ¶
func (a AuthenticationFailure) Error() string
type User ¶
func CheckToken ¶
func GetUserByEmail ¶
func GetUserByToken ¶
func (*User) AllowedApps ¶
func (*User) CheckPassword ¶
func (*User) HashPassword ¶
func (u *User) HashPassword()
Notes ¶
Bugs ¶
this function is deprecated, it's here for the migration phase (whenever a user login with the old hash, the new hash will be generated).
this is temporary code, for a migration phase in the hashing algorithm. In the future we should just use bcrypt.CompareHashAndPassword, and drop the old hash checking and update stuff.
Click to show internal directories.
Click to hide internal directories.