-
Notifications
You must be signed in to change notification settings - Fork 5
/
mock_oidc_server.go
39 lines (33 loc) · 1.15 KB
/
mock_oidc_server.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package models
import "golang.org/x/text/language"
// User implements oidc-server storage.User.
// It is used for development and testing purposes only.
// nolint: revive
// Still cannot access common interface fields:
//
// https://go101.org/generics/888-the-status-quo-of-go-custom-generics.html
type AuthServerUser struct {
ID_ string `json:"id"` // need exported for unmarshalling
Username_ string `json:"username"`
Password_ string `json:"password"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
EmailVerified bool `json:"emailVerified"`
Phone string `json:"phone"`
PhoneVerified bool `json:"phoneVerified"`
PreferredLanguage language.Tag `json:"preferredLanguage"`
IsAdmin_ bool `json:"isAdmin"`
}
func (u AuthServerUser) ID() string {
return u.ID_
}
func (u AuthServerUser) Username() string {
return u.Username_
}
func (u AuthServerUser) IsAdmin() bool {
return u.IsAdmin_
}
func (u AuthServerUser) Password() string {
return u.Password_
}