Core functionality for new aiterp.net servers
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

7 years ago
  1. package auth
  2. type User struct {
  3. ID string
  4. Name string
  5. Level string
  6. Data map[string]string
  7. method Authenticator
  8. }
  9. // FullID is the userid prefixed with the method ID
  10. func (user *User) FullID() string {
  11. return user.method.ID() + ":" + user.ID
  12. }
  13. func NewUser(method Authenticator, id, name, level string, data map[string]string) *User {
  14. return &User{id, name, level, data, method}
  15. }