zitadel

package
v0.0.0-...-de38334 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultUserGrantAction

func AddDefaultUserGrantAction(jwt, orgId, projectId string) string

func AddUserToIAM

func AddUserToIAM(jwt, userId string) (bool, error)

func AddUserToOrg

func AddUserToOrg(jwt, userId string, roles []string, orgId string) (bool, error)

func BulkAddRoleToProject

func BulkAddRoleToProject(jwt, projectId string, roles []RoleRequest) error

func CheckDefaultHumanUserUnique

func CheckDefaultHumanUserUnique(jwt string) bool

func CreateAction

func CreateAction(jwt, orgId, name, script string, allowedToFail bool) (string, error)

func CreateDefaultHumanUser

func CreateDefaultHumanUser(jwt string) (string, error)

func CreateDefaultProject

func CreateDefaultProject(jwt, name string, pRoleAssertion, pRoleCheck, hasProjectCheck bool, orgId string) (string, error)

func GenerateIntrospectionJWT

func GenerateIntrospectionJWT() (string, error)

func GenerateJWTFromKey

func GenerateJWTFromKey(filePath string, useId string) (string, error)

func GenerateJWTFromKeyFile

func GenerateJWTFromKeyFile() (string, error)

func GenerateJWTServiceUser

func GenerateJWTServiceUser() (string, error)

func IntrospectToken

func IntrospectToken(token string) (*types.IntrospectionResult, error)

func ReadDefaultClientID

func ReadDefaultClientID() string

func SetTriggerAction

func SetTriggerAction(jwt, orgId, flowType, triggerType string, actionIds []string) bool

func VerifySecret

func VerifySecret(clientId, secret string) bool

Types

type CreateAPIAppRequest

type CreateAPIAppRequest struct {
	Name           string `json:"name"`
	AuthMethodType string `json:"authMethodType"`
}

type CreateAPIAppResponse

type CreateAPIAppResponse struct {
	AppId        string `json:"appId"`
	ClientId     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

func CreateAPIApp

func CreateAPIApp(jwt, projectId, name string) (*CreateAPIAppResponse, error)

type CreateAPIKeyRequest

type CreateAPIKeyRequest struct {
	Type           string `json:"type"`
	ExpirationDate string `json:"expirationDate"`
}

type CreateAPIKeyResponse

type CreateAPIKeyResponse struct {
	ID         string `json:"id"`
	KeyDetails string `json:"keyDetails"`
}

func CreateAPIKey

func CreateAPIKey(jwt, projectId, appId string) (*CreateAPIKeyResponse, error)

type CreateOIDCAppRequest

type CreateOIDCAppRequest struct {
	Name                     string             `json:"name"`
	ResponseTypes            []OIDCResponseType `json:"responseTypes"`
	GrantTypes               []OIDCGrantType    `json:"grantTypes"`
	RedirectURIs             []string           `json:"redirectUris"`
	AppType                  OIDCAppType        `json:"appType"`
	AuthMethodType           OIDCAuthMethodType `json:"authMethodType"`
	DevMode                  bool               `json:"devMode"`
	AccessTokenRoleAssertion bool               `json:"accessTokenRoleAssertion"`
	IDTokenRoleAssertion     bool               `json:"idTokenRoleAssertion"`
	IdTokenUserInfoAssertion bool               `json:"idTokenUserinfoAssertion"`
}

type CreateOIDCAppResponse

type CreateOIDCAppResponse struct {
	AppId         string `json:"appId"`
	ClientId      string `json:"clientId"`
	ClientSecret  string `json:"clientSecret"`
	NoneCompliant bool   `json:"noneCompliant"`
}

func CreateOIDCApp

func CreateOIDCApp(orgId, projectId, jwt string, oidcAppRequest CreateOIDCAppRequest) (*CreateOIDCAppResponse, error)

type CreateZitadelUserEmail

type CreateZitadelUserEmail struct {
	Email      string `json:"email"`
	IsVerified bool   `json:"isVerified"`
}

type CreateZitadelUserPassword

type CreateZitadelUserPassword struct {
	Password       string `json:"password"`
	ChangeRequired bool   `json:"changeRequired"`
}

type CreateZitadelUserProfile

type CreateZitadelUserProfile struct {
	GivenName  string `json:"givenName"`
	FamilyName string `json:"familyName"`
}

type CreateZitadelUserRequest

type CreateZitadelUserRequest struct {
	Username string                    `json:"username"`
	Profile  CreateZitadelUserProfile  `json:"profile"`
	Email    CreateZitadelUserEmail    `json:"email"`
	Password CreateZitadelUserPassword `json:"password"`
}

type JWT

type JWT struct {
	Type     string `json:"type"`
	KeyId    string `json:"keyId"`
	Key      string `json:"key"`
	UserId   string `json:"userId"`
	ClientId string `json:"clientId"`
}

type OIDCAppType

type OIDCAppType string

type OIDCAuthMethodType

type OIDCAuthMethodType string

type OIDCGrantType

type OIDCGrantType string

type OIDCResponseType

type OIDCResponseType string

type RoleRequest

type RoleRequest struct {
	Key         string `json:"key"`
	DisplayName string `json:"display_name"`
}

type SecretAPIResponse

type SecretAPIResponse struct {
	ClientId     string `json:"ClientId"`
	ClientSecret string `json:"ClientSecret"`
	AppId        string `json:"AppId"`
}

func ReadDefaultAPISecret

func ReadDefaultAPISecret() *SecretAPIResponse

Jump to

Keyboard shortcuts

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