Documentation ¶
Index ¶
Constants ¶
View Source
const ( GitHubAuth = "github" AzureAuth = "azure" GoogleAuth = "google" // Users with both a personal Microsoft account and a work or school account from Azure AD can sign in to the application. AzureCommonTenant = "common" // Only users with work or school accounts from Azure AD can sign in to the application. AzureOrganizationsTenant = "organizations" // Only users with a personal Microsoft account can sign in to the application. AzureConsumersTenant = "consumers" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoogleUser ¶
type SecurityPrincipal ¶
type SecurityPrincipal struct { UID string `json:"uid"` ID string `json:"id"` AuthProvider string `json:"authProvider"` Token string `json:"token"` Login string `json:"login"` Name string `json:"name"` Email string `json:"email"` Groups []string `json:"groups"` ClientIP string `json:"clientIP"` UserAgentHash string `json:"userAgentHash"` Created time.Time `json:"created,omitempty"` }
func NewPrincipal ¶
func NewPrincipal(authProvider string, clientIP string, userAgent string, groupsEnabled bool) *SecurityPrincipal
func (*SecurityPrincipal) HasPermissions ¶
func (p *SecurityPrincipal) HasPermissions(permissions string) bool
func (*SecurityPrincipal) SetToken ¶
func (p *SecurityPrincipal) SetToken(token *oauth2.Token) error
func (*SecurityPrincipal) Signout ¶
func (p *SecurityPrincipal) Signout() error
func (*SecurityPrincipal) UpdateDetails ¶
func (p *SecurityPrincipal) UpdateDetails() error
type SigninOptions ¶
type SigninOptions struct { GitHubEnabled bool `json:"gitHubEnabled"` GitHubGroupScope bool `json:"gitHubGroupScope"` AzureEnabled bool `json:"azureEnabled"` AzureGroupScope bool `json:"azureGroupScope"` GoogleEnabled bool `json:"googleEnabled"` GoogleGroupScope bool `json:"googleGroupScope"` }
func GetSigninOptions ¶
func GetSigninOptions(permissions string) *SigninOptions
Source Files ¶
Click to show internal directories.
Click to hide internal directories.