You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
396 B
19 lines
396 B
package auth
|
|
|
|
type User struct {
|
|
ID string
|
|
Name string
|
|
Level string
|
|
Data map[string]string
|
|
|
|
method Authenticator
|
|
}
|
|
|
|
// FullID is the userid prefixed with the method ID
|
|
func (user *User) FullID() string {
|
|
return user.method.ID() + ":" + user.ID
|
|
}
|
|
|
|
func NewUser(method Authenticator, id, name, level string, data map[string]string) *User {
|
|
return &User{id, name, level, data, method}
|
|
}
|