Documentation
¶
Index ¶
- func CheckRedirectUrisCode(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
- func CheckRedirectUrisImplicit(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
- func CheckRedirectUrisImplicitAndCode(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
- func GetOIDCV1NativeApplicationCompliance(compliance *Compliance, authMethod OIDCAuthMethodType)
- func GetOIDCV1UserAgentApplicationCompliance(compliance *Compliance, authMethod OIDCAuthMethodType)
- type APIAuthMethodType
- type APIConfig
- func (c *APIConfig) GenerateClientSecretIfNeeded(generator crypto.Generator) (string, error)
- func (c *APIConfig) GenerateNewClientID(idGenerator id.Generator, project *Project) error
- func (c *APIConfig) GenerateNewClientSecret(generator crypto.Generator) (string, error)
- func (c *APIConfig) IsValid() bool
- type AppSearchKey
- type AppState
- type AppType
- type Application
- type ApplicationChange
- type ApplicationChanges
- type ApplicationSearchQuery
- type ApplicationSearchRequest
- type ApplicationSearchResponse
- type ApplicationView
- type ClientKey
- type Compliance
- type OIDCApplicationType
- type OIDCAuthMethodType
- type OIDCConfig
- func (c *OIDCConfig) FillCompliance()
- func (c *OIDCConfig) GenerateClientSecretIfNeeded(generator crypto.Generator) (string, error)
- func (c *OIDCConfig) GenerateNewClientID(idGenerator id.Generator, project *Project) error
- func (c *OIDCConfig) GenerateNewClientSecret(generator crypto.Generator) (string, error)
- func (c *OIDCConfig) IsValid() bool
- type OIDCGrantType
- type OIDCResponseType
- type OIDCTokenType
- type OIDCVersion
- type Project
- func (p *Project) ContainsGrantForOrg(orgID string) bool
- func (p *Project) ContainsGrantMember(member *ProjectGrantMember) bool
- func (p *Project) ContainsRole(role *ProjectRole) bool
- func (p *Project) ContainsRoles(roleKeys []string) bool
- func (p *Project) GetApp(appID string) (int, *Application)
- func (p *Project) GetGrant(grantID string) (int, *ProjectGrant)
- func (p *Project) GetMember(userID string) (int, *ProjectMember)
- func (p *Project) IsActive() bool
- func (p *Project) IsValid() bool
- type ProjectChange
- type ProjectChanges
- type ProjectGrant
- type ProjectGrantIDs
- type ProjectGrantMember
- type ProjectGrantMemberSearchKey
- type ProjectGrantMemberSearchQuery
- type ProjectGrantMemberSearchRequest
- type ProjectGrantMemberSearchResponse
- type ProjectGrantMemberView
- type ProjectGrantState
- type ProjectGrantView
- type ProjectGrantViewSearchKey
- type ProjectGrantViewSearchQuery
- type ProjectGrantViewSearchRequest
- func (r *ProjectGrantViewSearchRequest) AppendMyOrgQuery(orgID string)
- func (r *ProjectGrantViewSearchRequest) AppendMyResourceOwnerQuery(orgID string)
- func (r *ProjectGrantViewSearchRequest) AppendNotMyOrgQuery(orgID string)
- func (r *ProjectGrantViewSearchRequest) EnsureLimit(limit uint64)
- func (r *ProjectGrantViewSearchRequest) GetSearchQuery(key ProjectGrantViewSearchKey) (int, *ProjectGrantViewSearchQuery)
- type ProjectGrantViewSearchResponse
- type ProjectMember
- type ProjectMemberSearchKey
- type ProjectMemberSearchQuery
- type ProjectMemberSearchRequest
- type ProjectMemberSearchResponse
- type ProjectMemberView
- type ProjectRole
- type ProjectRoleSearchKey
- type ProjectRoleSearchQuery
- type ProjectRoleSearchRequest
- type ProjectRoleSearchResponse
- type ProjectRoleView
- type ProjectState
- type ProjectView
- type ProjectViewSearchKey
- type ProjectViewSearchQuery
- type ProjectViewSearchRequest
- type ProjectViewSearchResponse
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRedirectUrisCode ¶ added in v0.70.0
func CheckRedirectUrisCode(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
func CheckRedirectUrisImplicit ¶ added in v0.70.0
func CheckRedirectUrisImplicit(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
func CheckRedirectUrisImplicitAndCode ¶ added in v0.70.0
func CheckRedirectUrisImplicitAndCode(compliance *Compliance, appType OIDCApplicationType, redirectUris []string)
func GetOIDCV1NativeApplicationCompliance ¶ added in v0.70.0
func GetOIDCV1NativeApplicationCompliance(compliance *Compliance, authMethod OIDCAuthMethodType)
func GetOIDCV1UserAgentApplicationCompliance ¶ added in v0.70.0
func GetOIDCV1UserAgentApplicationCompliance(compliance *Compliance, authMethod OIDCAuthMethodType)
Types ¶
type APIAuthMethodType ¶ added in v0.115.0
type APIAuthMethodType int32
const ( APIAuthMethodTypeBasic APIAuthMethodType = iota APIAuthMethodTypePrivateKeyJWT )
type APIConfig ¶ added in v0.115.0
type APIConfig struct {
es_models.ObjectRoot
AppID string
ClientID string
ClientSecret *crypto.CryptoValue
ClientSecretString string
AuthMethodType APIAuthMethodType
ClientKeys []*ClientKey
}
func (*APIConfig) GenerateClientSecretIfNeeded ¶ added in v0.115.0
func (*APIConfig) GenerateNewClientID ¶ added in v0.115.0
ClientID random_number@projectname (eg. 495894098234@zitadel)
func (*APIConfig) GenerateNewClientSecret ¶ added in v0.115.0
type AppSearchKey ¶ added in v0.33.5
type AppSearchKey int32
const ( AppSearchKeyUnspecified AppSearchKey = iota AppSearchKeyName AppSearchKeyOIDCClientID AppSearchKeyProjectID AppSearchKeyAppID )
type Application ¶ added in v0.6.0
type Application struct {
es_models.ObjectRoot
AppID string
State AppState
Name string
Type AppType
OIDCConfig *OIDCConfig
APIConfig *APIConfig
}
func NewApplication ¶ added in v0.6.0
func NewApplication(projectID, appID string) *Application
func (*Application) GetKey ¶ added in v0.115.0
func (a *Application) GetKey(keyID string) (int, *ClientKey)
func (*Application) IsValid ¶ added in v0.6.0
func (a *Application) IsValid(includeConfig bool) bool
type ApplicationChange ¶ added in v0.25.1
type ApplicationChange struct {
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
EventType string `json:"eventType,omitempty"`
Sequence uint64 `json:"sequence,omitempty"`
ModifierId string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
type ApplicationChanges ¶ added in v0.25.1
type ApplicationChanges struct {
Changes []*ApplicationChange
LastSequence uint64
}
type ApplicationSearchQuery ¶ added in v0.11.0
type ApplicationSearchQuery struct {
Key AppSearchKey
Method model.SearchMethod
Value interface{}
}
type ApplicationSearchRequest ¶ added in v0.11.0
type ApplicationSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn AppSearchKey
Asc bool
Queries []*ApplicationSearchQuery
}
func (*ApplicationSearchRequest) EnsureLimit ¶ added in v0.11.0
func (r *ApplicationSearchRequest) EnsureLimit(limit uint64)
type ApplicationSearchResponse ¶ added in v0.11.0
type ApplicationView ¶ added in v0.11.0
type ApplicationView struct {
ID string
ProjectID string
Name string
CreationDate time.Time
ChangeDate time.Time
State AppState
ProjectRoleAssertion bool
ProjectRoleCheck bool
IsOIDC bool
OIDCVersion OIDCVersion
OIDCClientID string
OIDCRedirectUris []string
OIDCResponseTypes []OIDCResponseType
OIDCGrantTypes []OIDCGrantType
OIDCApplicationType OIDCApplicationType
OIDCAuthMethodType OIDCAuthMethodType
OIDCPostLogoutRedirectUris []string
NoneCompliant bool
ComplianceProblems []string
DevMode bool
OriginAllowList []string
AccessTokenType OIDCTokenType
IDTokenRoleAssertion bool
AccessTokenRoleAssertion bool
IDTokenUserinfoAssertion bool
ClockSkew time.Duration
Sequence uint64
}
type ClientKey ¶ added in v0.115.0
type ClientKey struct {
es_models.ObjectRoot
ApplicationID string
ClientID string
KeyID string
Type key_model.AuthNKeyType
ExpirationDate time.Time
PrivateKey []byte
}
type Compliance ¶ added in v0.70.0
func GetOIDCCompliance ¶ added in v0.70.0
func GetOIDCCompliance(version OIDCVersion, appType OIDCApplicationType, grantTypes []OIDCGrantType, responseTypes []OIDCResponseType, authMethod OIDCAuthMethodType, redirectUris []string) *Compliance
func GetOIDCV1Compliance ¶ added in v0.70.0
func GetOIDCV1Compliance(appType OIDCApplicationType, grantTypes []OIDCGrantType, authMethod OIDCAuthMethodType, redirectUris []string) *Compliance
type OIDCApplicationType ¶ added in v0.6.0
type OIDCApplicationType int32
const ( OIDCApplicationTypeWeb OIDCApplicationType = iota OIDCApplicationTypeUserAgent OIDCApplicationTypeNative )
type OIDCAuthMethodType ¶ added in v0.6.0
type OIDCAuthMethodType int32
const ( OIDCAuthMethodTypeBasic OIDCAuthMethodType = iota OIDCAuthMethodTypePost OIDCAuthMethodTypeNone OIDCAuthMethodTypePrivateKeyJWT )
type OIDCConfig ¶ added in v0.6.0
type OIDCConfig struct {
es_models.ObjectRoot
AppID string
ClientID string
ClientSecret *crypto.CryptoValue
ClientSecretString string
RedirectUris []string
ResponseTypes []OIDCResponseType
GrantTypes []OIDCGrantType
ApplicationType OIDCApplicationType
AuthMethodType OIDCAuthMethodType
PostLogoutRedirectUris []string
OIDCVersion OIDCVersion
Compliance *Compliance
DevMode bool
AccessTokenType OIDCTokenType
AccessTokenRoleAssertion bool
IDTokenRoleAssertion bool
IDTokenUserinfoAssertion bool
ClockSkew time.Duration
ClientKeys []*ClientKey
}
func (*OIDCConfig) FillCompliance ¶ added in v0.70.0
func (c *OIDCConfig) FillCompliance()
func (*OIDCConfig) GenerateClientSecretIfNeeded ¶ added in v0.69.1
func (c *OIDCConfig) GenerateClientSecretIfNeeded(generator crypto.Generator) (string, error)
func (*OIDCConfig) GenerateNewClientID ¶ added in v0.69.1
func (c *OIDCConfig) GenerateNewClientID(idGenerator id.Generator, project *Project) error
ClientID random_number@projectname (eg. 495894098234@zitadel)
func (*OIDCConfig) GenerateNewClientSecret ¶ added in v0.69.1
func (c *OIDCConfig) GenerateNewClientSecret(generator crypto.Generator) (string, error)
func (*OIDCConfig) IsValid ¶ added in v0.6.0
func (c *OIDCConfig) IsValid() bool
type OIDCGrantType ¶ added in v0.6.0
type OIDCGrantType int32
const ( OIDCGrantTypeAuthorizationCode OIDCGrantType = iota OIDCGrantTypeImplicit OIDCGrantTypeRefreshToken )
type OIDCResponseType ¶ added in v0.6.0
type OIDCResponseType int32
const ( OIDCResponseTypeCode OIDCResponseType = iota OIDCResponseTypeIDToken OIDCResponseTypeIDTokenToken )
type OIDCTokenType ¶ added in v0.94.0
type OIDCTokenType int32
const ( OIDCTokenTypeBearer OIDCTokenType = iota OIDCTokenTypeJWT )
type OIDCVersion ¶ added in v0.70.0
type OIDCVersion int32
const (
OIDCVersionV1 OIDCVersion = iota
)
type Project ¶
type Project struct {
es_models.ObjectRoot
State ProjectState
Name string
Members []*ProjectMember
Roles []*ProjectRole
Applications []*Application
Grants []*ProjectGrant
ProjectRoleAssertion bool
ProjectRoleCheck bool
}
func NewProject ¶
func (*Project) ContainsGrantForOrg ¶ added in v0.7.0
func (*Project) ContainsGrantMember ¶ added in v0.7.0
func (p *Project) ContainsGrantMember(member *ProjectGrantMember) bool
func (*Project) ContainsRole ¶ added in v0.6.0
func (p *Project) ContainsRole(role *ProjectRole) bool
func (*Project) ContainsRoles ¶ added in v0.7.0
func (*Project) GetGrant ¶ added in v0.7.0
func (p *Project) GetGrant(grantID string) (int, *ProjectGrant)
type ProjectChange ¶ added in v0.25.1
type ProjectChange struct {
ChangeDate *timestamp.Timestamp `json:"changeDate,omitempty"`
EventType string `json:"eventType,omitempty"`
Sequence uint64 `json:"sequence,omitempty"`
ModifierId string `json:"modifierUser,omitempty"`
ModifierName string `json:"-"`
Data interface{} `json:"data,omitempty"`
}
type ProjectChanges ¶ added in v0.25.1
type ProjectChanges struct {
Changes []*ProjectChange
LastSequence uint64
}
type ProjectGrant ¶ added in v0.7.0
type ProjectGrant struct {
es_models.ObjectRoot
GrantID string
GrantedOrgID string
State ProjectGrantState
RoleKeys []string
Members []*ProjectGrantMember
}
func NewProjectGrant ¶ added in v0.7.0
func NewProjectGrant(projectID, grantID string) *ProjectGrant
func (*ProjectGrant) GetMember ¶ added in v0.7.0
func (p *ProjectGrant) GetMember(userID string) (int, *ProjectGrantMember)
func (*ProjectGrant) GetRemovedRoles ¶ added in v0.32.0
func (p *ProjectGrant) GetRemovedRoles(roleKeys []string) []string
func (*ProjectGrant) IsActive ¶ added in v0.7.0
func (p *ProjectGrant) IsActive() bool
func (*ProjectGrant) IsValid ¶ added in v0.7.0
func (p *ProjectGrant) IsValid() bool
type ProjectGrantIDs ¶ added in v0.32.0
type ProjectGrantMember ¶ added in v0.7.0
type ProjectGrantMember struct {
es_models.ObjectRoot
GrantID string
UserID string
Roles []string
}
func NewProjectGrantMember ¶ added in v0.7.0
func NewProjectGrantMember(projectID, grantID, userID string) *ProjectGrantMember
func (*ProjectGrantMember) IsValid ¶ added in v0.7.0
func (p *ProjectGrantMember) IsValid() bool
type ProjectGrantMemberSearchKey ¶ added in v0.11.0
type ProjectGrantMemberSearchKey int32
const ( ProjectGrantMemberSearchKeyUnspecified ProjectGrantMemberSearchKey = iota ProjectGrantMemberSearchKeyUserName ProjectGrantMemberSearchKeyEmail ProjectGrantMemberSearchKeyFirstName ProjectGrantMemberSearchKeyLastName ProjectGrantMemberSearchKeyGrantID ProjectGrantMemberSearchKeyUserID ProjectGrantMemberSearchKeyProjectID )
type ProjectGrantMemberSearchQuery ¶ added in v0.11.0
type ProjectGrantMemberSearchQuery struct {
Key ProjectGrantMemberSearchKey
Method model.SearchMethod
Value interface{}
}
type ProjectGrantMemberSearchRequest ¶ added in v0.11.0
type ProjectGrantMemberSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn ProjectGrantMemberSearchKey
Asc bool
Queries []*ProjectGrantMemberSearchQuery
}
func (*ProjectGrantMemberSearchRequest) EnsureLimit ¶ added in v0.11.0
func (r *ProjectGrantMemberSearchRequest) EnsureLimit(limit uint64)
type ProjectGrantMemberSearchResponse ¶ added in v0.11.0
type ProjectGrantMemberView ¶ added in v0.11.0
type ProjectGrantState ¶ added in v0.7.0
type ProjectGrantState int32
const ( ProjectGrantStateActive ProjectGrantState = iota ProjectGrantStateInactive )
type ProjectGrantView ¶ added in v0.25.0
type ProjectGrantViewSearchKey ¶ added in v0.25.0
type ProjectGrantViewSearchKey int32
const ( GrantedProjectSearchKeyUnspecified ProjectGrantViewSearchKey = iota GrantedProjectSearchKeyName GrantedProjectSearchKeyProjectID GrantedProjectSearchKeyGrantID GrantedProjectSearchKeyOrgID GrantedProjectSearchKeyResourceOwner GrantedProjectSearchKeyRoleKeys )
type ProjectGrantViewSearchQuery ¶ added in v0.25.0
type ProjectGrantViewSearchQuery struct {
Key ProjectGrantViewSearchKey
Method model.SearchMethod
Value interface{}
}
type ProjectGrantViewSearchRequest ¶ added in v0.25.0
type ProjectGrantViewSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn ProjectGrantViewSearchKey
Asc bool
Queries []*ProjectGrantViewSearchQuery
}
func (*ProjectGrantViewSearchRequest) AppendMyOrgQuery ¶ added in v0.25.0
func (r *ProjectGrantViewSearchRequest) AppendMyOrgQuery(orgID string)
func (*ProjectGrantViewSearchRequest) AppendMyResourceOwnerQuery ¶ added in v0.25.0
func (r *ProjectGrantViewSearchRequest) AppendMyResourceOwnerQuery(orgID string)
func (*ProjectGrantViewSearchRequest) AppendNotMyOrgQuery ¶ added in v0.25.0
func (r *ProjectGrantViewSearchRequest) AppendNotMyOrgQuery(orgID string)
func (*ProjectGrantViewSearchRequest) EnsureLimit ¶ added in v0.25.0
func (r *ProjectGrantViewSearchRequest) EnsureLimit(limit uint64)
func (*ProjectGrantViewSearchRequest) GetSearchQuery ¶ added in v0.62.0
func (r *ProjectGrantViewSearchRequest) GetSearchQuery(key ProjectGrantViewSearchKey) (int, *ProjectGrantViewSearchQuery)
type ProjectGrantViewSearchResponse ¶ added in v0.25.0
type ProjectMember ¶ added in v0.4.0
type ProjectMember struct {
es_models.ObjectRoot
UserID string
Roles []string
}
func NewProjectMember ¶ added in v0.4.0
func NewProjectMember(projectID, userID string) *ProjectMember
func (*ProjectMember) IsValid ¶ added in v0.4.0
func (p *ProjectMember) IsValid() bool
type ProjectMemberSearchKey ¶ added in v0.11.0
type ProjectMemberSearchKey int32
const ( ProjectMemberSearchKeyUnspecified ProjectMemberSearchKey = iota ProjectMemberSearchKeyUserName ProjectMemberSearchKeyEmail ProjectMemberSearchKeyFirstName ProjectMemberSearchKeyLastName ProjectMemberSearchKeyProjectID ProjectMemberSearchKeyUserID )
type ProjectMemberSearchQuery ¶ added in v0.11.0
type ProjectMemberSearchQuery struct {
Key ProjectMemberSearchKey
Method model.SearchMethod
Value interface{}
}
type ProjectMemberSearchRequest ¶ added in v0.11.0
type ProjectMemberSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn ProjectMemberSearchKey
Asc bool
Queries []*ProjectMemberSearchQuery
}
func (*ProjectMemberSearchRequest) AppendProjectQuery ¶ added in v0.24.0
func (r *ProjectMemberSearchRequest) AppendProjectQuery(projectID string)
func (*ProjectMemberSearchRequest) EnsureLimit ¶ added in v0.11.0
func (r *ProjectMemberSearchRequest) EnsureLimit(limit uint64)
type ProjectMemberSearchResponse ¶ added in v0.11.0
type ProjectMemberView ¶ added in v0.11.0
type ProjectRole ¶ added in v0.6.0
type ProjectRole struct {
es_models.ObjectRoot
Key string
DisplayName string
Group string
}
func NewProjectRole ¶ added in v0.6.0
func NewProjectRole(projectID, key string) *ProjectRole
func (*ProjectRole) IsValid ¶ added in v0.6.0
func (p *ProjectRole) IsValid() bool
type ProjectRoleSearchKey ¶ added in v0.11.0
type ProjectRoleSearchKey int32
const ( ProjectRoleSearchKeyUnspecified ProjectRoleSearchKey = iota ProjectRoleSearchKeyKey ProjectRoleSearchKeyProjectID ProjectRoleSearchKeyOrgID ProjectRoleSearchKeyResourceOwner ProjectRoleSearchKeyDisplayName )
type ProjectRoleSearchQuery ¶ added in v0.11.0
type ProjectRoleSearchQuery struct {
Key ProjectRoleSearchKey
Method model.SearchMethod
Value interface{}
}
type ProjectRoleSearchRequest ¶ added in v0.11.0
type ProjectRoleSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn ProjectRoleSearchKey
Asc bool
Queries []*ProjectRoleSearchQuery
}
func (*ProjectRoleSearchRequest) AppendMyOrgQuery ¶ added in v0.11.0
func (r *ProjectRoleSearchRequest) AppendMyOrgQuery(orgID string)
func (*ProjectRoleSearchRequest) AppendProjectQuery ¶ added in v0.24.0
func (r *ProjectRoleSearchRequest) AppendProjectQuery(projectID string)
func (*ProjectRoleSearchRequest) EnsureLimit ¶ added in v0.11.0
func (r *ProjectRoleSearchRequest) EnsureLimit(limit uint64)
type ProjectRoleSearchResponse ¶ added in v0.11.0
type ProjectRoleView ¶ added in v0.11.0
type ProjectState ¶
type ProjectState int32
const ( ProjectStateActive ProjectState = iota ProjectStateInactive ProjectStateRemoved )
type ProjectView ¶ added in v0.25.0
type ProjectViewSearchKey ¶ added in v0.25.0
type ProjectViewSearchKey int32
const ( ProjectViewSearchKeyUnspecified ProjectViewSearchKey = iota ProjectViewSearchKeyName ProjectViewSearchKeyProjectID ProjectViewSearchKeyResourceOwner )
type ProjectViewSearchQuery ¶ added in v0.25.0
type ProjectViewSearchQuery struct {
Key ProjectViewSearchKey
Method model.SearchMethod
Value interface{}
}
type ProjectViewSearchRequest ¶ added in v0.25.0
type ProjectViewSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn ProjectViewSearchKey
Asc bool
Queries []*ProjectViewSearchQuery
}
func (*ProjectViewSearchRequest) AppendMyResourceOwnerQuery ¶ added in v0.25.0
func (r *ProjectViewSearchRequest) AppendMyResourceOwnerQuery(orgID string)
func (*ProjectViewSearchRequest) EnsureLimit ¶ added in v0.25.0
func (r *ProjectViewSearchRequest) EnsureLimit(limit uint64)
func (*ProjectViewSearchRequest) GetSearchQuery ¶ added in v0.62.0
func (r *ProjectViewSearchRequest) GetSearchQuery(key ProjectViewSearchKey) (int, *ProjectViewSearchQuery)
type ProjectViewSearchResponse ¶ added in v0.25.0
Click to show internal directories.
Click to hide internal directories.