model

package
v1.22.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrgDomainPrimaryScope = "urn:zitadel:iam:org:domain:primary:"
	OrgDomainPrimaryClaim = "urn:zitadel:iam:org:domain:primary"
	ProjectIDScope        = "urn:zitadel:iam:org:project:id:"
	AudSuffix             = ":aud"
)

Variables

This section is empty.

Functions

func MFALevelToDomain added in v0.119.0

func MFALevelToDomain(mfaLevel MFALevel) domain.MFALevel

func MFATypeToDomain added in v0.119.0

func MFATypeToDomain(mfaType MFAType) domain.MFAType

func UserSessionStateToDomain added in v0.119.0

func UserSessionStateToDomain(state UserSessionState) domain.UserSessionState

Types

type AuthRequest

type AuthRequest struct {
	ID            string
	AgentID       string
	CreationDate  time.Time
	ChangeDate    time.Time
	BrowserInfo   *BrowserInfo
	ApplicationID string
	CallbackURI   string
	TransferState string
	Prompt        Prompt
	PossibleLOAs  []LevelOfAssurance
	UiLocales     []string
	LoginHint     string
	MaxAuthAge    uint32
	Request       Request

	UserID                 string
	UserName               string
	LoginName              string
	DisplayName            string
	UserOrgID              string
	RequestedOrgID         string
	RequestedOrgName       string
	RequestedPrimaryDomain string
	SelectedIDPConfigID    string
	LinkingUsers           []*ExternalUser
	PossibleSteps          []NextStep
	PasswordVerified       bool
	MFAsVerified           []MFAType
	Audience               []string
	AuthTime               time.Time
	Code                   string
	LoginPolicy            *model.LoginPolicyView
	LabelPolicy            *model.LabelPolicyView
	AllowedExternalIDPs    []*model.IDPProviderView
	// contains filtered or unexported fields
}

func NewAuthRequest

func NewAuthRequest(id, agentID string, info *BrowserInfo, applicationID, callbackURI, transferState string,
	prompt Prompt, possibleLOAs []LevelOfAssurance, uiLocales []string, loginHint, preselectedUserID string, maxAuthAge uint32, request Request) *AuthRequest

func NewAuthRequestFromType added in v0.20.0

func NewAuthRequestFromType(requestType AuthRequestType) (*AuthRequest, error)

func (*AuthRequest) AppendAudIfNotExisting added in v0.103.1

func (a *AuthRequest) AppendAudIfNotExisting(aud string)

func (*AuthRequest) GetScopeOrgPrimaryDomain added in v0.88.5

func (a *AuthRequest) GetScopeOrgPrimaryDomain() string

func (*AuthRequest) GetScopeProjectIDsForAud added in v0.103.1

func (a *AuthRequest) GetScopeProjectIDsForAud() []string

func (*AuthRequest) IsValid

func (a *AuthRequest) IsValid() bool

func (*AuthRequest) MFALevel added in v0.108.0

func (a *AuthRequest) MFALevel() MFALevel

func (*AuthRequest) SetUserInfo added in v0.20.0

func (a *AuthRequest) SetUserInfo(userID, userName, loginName, displayName, userOrgID string)

func (*AuthRequest) WithCurrentInfo

func (a *AuthRequest) WithCurrentInfo(info *BrowserInfo) *AuthRequest

type AuthRequestOIDC

type AuthRequestOIDC struct {
	Scopes        []string
	ResponseType  OIDCResponseType
	Nonce         string
	CodeChallenge *OIDCCodeChallenge
}

func (*AuthRequestOIDC) IsValid

func (a *AuthRequestOIDC) IsValid() bool

func (*AuthRequestOIDC) Type

func (a *AuthRequestOIDC) Type() AuthRequestType

type AuthRequestSAML

type AuthRequestSAML struct {
}

func (*AuthRequestSAML) IsValid

func (a *AuthRequestSAML) IsValid() bool

func (*AuthRequestSAML) Type

func (a *AuthRequestSAML) Type() AuthRequestType

type AuthRequestType

type AuthRequestType int32
const (
	AuthRequestTypeOIDC AuthRequestType = iota
	AuthRequestTypeSAML
)

type BrowserInfo

type BrowserInfo struct {
	UserAgent      string
	AcceptLanguage string
	RemoteIP       net.IP
}

func BrowserInfoFromRequest added in v0.20.0

func BrowserInfoFromRequest(r *http.Request) *BrowserInfo

func (*BrowserInfo) IsValid

func (i *BrowserInfo) IsValid() bool

type ChangePasswordStep

type ChangePasswordStep struct{}

func (*ChangePasswordStep) Type

func (s *ChangePasswordStep) Type() NextStepType

type ChangeUsernameStep added in v0.78.0

type ChangeUsernameStep struct{}

func (*ChangeUsernameStep) Type added in v0.78.0

func (s *ChangeUsernameStep) Type() NextStepType

type ExternalLoginStep added in v0.89.1

type ExternalLoginStep struct {
	SelectedIDPConfigID string
}

func (*ExternalLoginStep) Type added in v0.89.1

func (s *ExternalLoginStep) Type() NextStepType

type ExternalNotFoundOptionStep added in v0.87.0

type ExternalNotFoundOptionStep struct{}

func (*ExternalNotFoundOptionStep) Type added in v0.87.0

type ExternalUser added in v0.87.0

type ExternalUser struct {
	IDPConfigID       string
	ExternalUserID    string
	DisplayName       string
	PreferredUsername string
	FirstName         string
	LastName          string
	NickName          string
	Email             string
	IsEmailVerified   bool
	PreferredLanguage language.Tag
	Phone             string
	IsPhoneVerified   bool
}

type GrantRequiredStep added in v0.94.0

type GrantRequiredStep struct{}

func (*GrantRequiredStep) Type added in v0.94.0

func (s *GrantRequiredStep) Type() NextStepType

type InitPasswordStep

type InitPasswordStep struct{}

func (*InitPasswordStep) Type

func (s *InitPasswordStep) Type() NextStepType

type InitUserStep added in v0.20.0

type InitUserStep struct {
	PasswordSet bool
}

func (*InitUserStep) Type added in v0.20.0

func (s *InitUserStep) Type() NextStepType

type LevelOfAssurance

type LevelOfAssurance int
const (
	LevelOfAssuranceNone LevelOfAssurance = iota
)

type LinkUsersStep added in v0.87.0

type LinkUsersStep struct{}

func (*LinkUsersStep) Type added in v0.87.0

func (s *LinkUsersStep) Type() NextStepType

type LoginStep

type LoginStep struct{}

func (*LoginStep) Type

func (s *LoginStep) Type() NextStepType

type MFALevel added in v0.102.0

type MFALevel int
const (
	MFALevelNotSetUp MFALevel = iota
	MFALevelSecondFactor
	MFALevelMultiFactor
	MFALevelMultiFactorCertified
)

type MFAPromptStep added in v0.108.0

type MFAPromptStep struct {
	Required     bool
	MFAProviders []MFAType
}

func (*MFAPromptStep) Type added in v0.108.0

func (s *MFAPromptStep) Type() NextStepType

type MFAType added in v0.102.0

type MFAType int
const (
	MFATypeOTP MFAType = iota
	MFATypeU2F
	MFATypeU2FUserVerification
)

type MFAVerificationStep added in v0.108.0

type MFAVerificationStep struct {
	MFAProviders []MFAType
}

func (*MFAVerificationStep) Type added in v0.108.0

type NextStep

type NextStep interface {
	Type() NextStepType
}

type NextStepType

type NextStepType int32
const (
	NextStepUnspecified NextStepType = iota
	NextStepLogin
	NextStepUserSelection
	NextStepInitUser
	NextStepPassword
	NextStepChangePassword
	NextStepInitPassword
	NextStepVerifyEmail
	NextStepMFAPrompt
	NextStepMFAVerify
	NextStepRedirectToCallback
	NextStepChangeUsername
	NextStepLinkUsers
	NextStepExternalNotFoundOption
	NextStepExternalLogin
	NextStepGrantRequired
	NextStepPasswordless
)

type OIDCCodeChallenge

type OIDCCodeChallenge struct {
	Challenge string
	Method    OIDCCodeChallengeMethod
}

func (*OIDCCodeChallenge) IsValid

func (c *OIDCCodeChallenge) IsValid() bool

type OIDCCodeChallengeMethod

type OIDCCodeChallengeMethod int32
const (
	CodeChallengeMethodPlain OIDCCodeChallengeMethod = iota
	CodeChallengeMethodS256
)

type OIDCResponseType

type OIDCResponseType int32
const (
	OIDCResponseTypeCode OIDCResponseType = iota
	OIDCResponseTypeIdToken
	OIDCResponseTypeIdTokenToken
)

type PasswordStep

type PasswordStep struct{}

func (*PasswordStep) Type

func (s *PasswordStep) Type() NextStepType

type PasswordlessStep added in v0.108.0

type PasswordlessStep struct{}

func (*PasswordlessStep) Type added in v0.108.0

func (s *PasswordlessStep) Type() NextStepType

type Prompt

type Prompt int32
const (
	PromptUnspecified Prompt = iota
	PromptNone
	PromptLogin
	PromptConsent
	PromptSelectAccount
)

type RedirectToCallbackStep

type RedirectToCallbackStep struct{}

func (*RedirectToCallbackStep) Type

type Request

type Request interface {
	Type() AuthRequestType
	IsValid() bool
}

type SelectUserStep

type SelectUserStep struct {
	Users []UserSelection
}

func (*SelectUserStep) Type

func (s *SelectUserStep) Type() NextStepType

type UserSelection

type UserSelection struct {
	UserID            string
	DisplayName       string
	UserName          string
	LoginName         string
	UserSessionState  UserSessionState
	SelectionPossible bool
}

type UserSessionState

type UserSessionState int32
const (
	UserSessionStateActive UserSessionState = iota
	UserSessionStateTerminated
)

type VerifyEMailStep

type VerifyEMailStep struct{}

func (*VerifyEMailStep) Type

func (s *VerifyEMailStep) Type() NextStepType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL