Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ADFSUser ¶
ADFSUser Active Directory user record
func (*ADFSUser) PrepareUserData ¶
func (u *ADFSUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type AliData ¶
type AliData struct { Sub string `json:"sub"` Username string `json:"username"` Nickname string `json:"nickname"` Email string `json:"email"` ID string `json:"ou_id"` Phone string `json:"phone_number"` OuName string `json:"ou_name"` }
AliData `data` subobject of Alibaba User response https://github.com/Choo57/vouch-proxy-2/issues/344
type AlibabaUser ¶
AlibabaUser Aliyun
func (*AlibabaUser) PrepareUserData ¶
func (u *AlibabaUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type AzureUser ¶
AzureUser is a retrieved and authenticated user from Azure AD
func (*AzureUser) PrepareUserData ¶
func (u *AzureUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type Contact ¶
type Contact struct { Type string `json:"type"` Value string `json:"value"` Verified bool `json:"is_verified"` }
Contact used for OpenStaxUser
type CustomClaims ¶
type CustomClaims struct {
Claims map[string]interface{}
}
CustomClaims Temporary struct storing custom claims until JWT creation.
type GitHubTeamMembershipState ¶
type GitHubTeamMembershipState struct {
State string `json:"state"`
}
GitHubTeamMembershipState for GitHub team api call
type GitHubUser ¶
GitHubUser is a retrieved and authentiacted user from GitHub.
func (*GitHubUser) PrepareUserData ¶
func (u *GitHubUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type GoogleUser ¶
type GoogleUser struct { User Sub string `json:"sub"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Profile string `json:"profile"` Picture string `json:"picture"` EmailVerified bool `json:"email_verified"` Gender string `json:"gender"` HostDomain string `json:"hd"` }
GoogleUser is a retrieved and authentiacted user from Google. unused! TODO: see if these should be pointers to the *User object as per https://golang.org/doc/effective_go.html#embedding
func (*GoogleUser) PrepareUserData ¶
func (u *GoogleUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type IndieAuthUser ¶
IndieAuthUser see indieauth.net
func (*IndieAuthUser) PrepareUserData ¶
func (u *IndieAuthUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type NextcloudUser ¶
NextcloudUser User of Nextcloud retreived from ocs endpoint
func (*NextcloudUser) PrepareUserData ¶
func (u *NextcloudUser) PrepareUserData()
PrepareUserData NextcloudUser
type Ocs ¶
type Ocs struct { Data struct { UserID string `json:"id"` Email string `json:"email"` } `json:"data"` }
Ocs used for NextcloudUser
type OpenStaxUser ¶
OpenStaxUser is a retrieved and authenticated user from OpenStax Accounts
func (*OpenStaxUser) PrepareUserData ¶
func (u *OpenStaxUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type Site ¶
type Site struct { Domain string `json:"domain"` CreatedOn int64 `json:"createdon"` LastUpdate int64 `json:"lastupdate"` ID int `json:"id" mapstructure:"id"` }
Site is the basic unit of auth
type Team ¶
type Team struct { Name string `json:"name" mapstructure:"name"` Members []string `json:"members" mapstructure:"members"` // just the emails Sites []string `json:"sites" mapstructure:"sites"` // just the domains CreatedOn int64 `json:"createdon" mapstructure:"createdon"` LastUpdate int64 `json:"lastupdate" mapstructure:"lastupdate"` ID int `json:"id" mapstructure:"id"` }
Team has members and provides acess to sites
type User ¶
type User struct { // TODO: set Provider here so that we can pass it to db // populated by db (via mapstructure) or from provider (via json) // Provider string `json:"provider",mapstructure:"provider"` Username string `json:"username" mapstructure:"username"` Name string `json:"name" mapstructure:"name"` Email string `json:"email" mapstructure:"email"` CreatedOn int64 `json:"createdon"` LastUpdate int64 `json:"lastupdate"` // don't populate ID from json https://github.com/Choo57/vouch-proxy-2/issues/185 ID int `json:"-" mapstructure:"id"` TeamMemberships []string }
User is inherited.
func (*User) PrepareUserData ¶
func (u *User) PrepareUserData()
PrepareUserData implement PersonalData interface