api

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignRoleRequestDto

type AssignRoleRequestDto struct {
	UserId uuid.UUID `json:"userId" validate:"required,uuid=4"`
}

type AssociateServiceUserPublicKeyRequestDto

type AssociateServiceUserPublicKeyRequestDto struct {
	PublicKey string `json:"publicKey" validate:"required"`
}

type AssociateServiceUserPublicKeyResponseDto

type AssociateServiceUserPublicKeyResponseDto struct {
	Kid string `json:"kid"`
}

type CreateApplicationRequestDto

type CreateApplicationRequestDto struct {
	Name                  string   `json:"name" validate:"required,min=1,max=255"`
	DisplayName           string   `json:"displayName" validate:"required,min=1,max=255"`
	RedirectUris          []string `json:"redirectUris" validate:"required,dive,url,min=1"`
	PostLogoutUris        []string `json:"postLogoutUris" validate:"dive,url"`
	Type                  string   `json:"type" validate:"required,oneof=public confidential"`
	AccessTokenHeaderType *string  `json:"accessTokenHeaderType" validate:"omitempty,oneof=at+jwt JWT"`
	DeviceFlowEnabled     bool     `json:"deviceFlowEnabled"`
}

type CreateApplicationResponseDto

type CreateApplicationResponseDto struct {
	Id     uuid.UUID `json:"id"`
	Secret *string   `json:"secret,omitempty"`
}

type CreatePasswordRuleRequestDto

type CreatePasswordRuleRequestDto struct {
	Type    string                 `json:"type" validate:"required"`
	Details map[string]interface{} `json:"details" validate:"required"`
}

type CreateProjectRequestDto

type CreateProjectRequestDto struct {
	Slug        string `json:"slug" validate:"required,min=1,max=255"`
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description"`
}

type CreateProjectResponseDto

type CreateProjectResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type CreateResourceServerRequestDto

type CreateResourceServerRequestDto struct {
	Slug        string `json:"slug" validate:"required,min=1,max=255"`
	Name        string `json:"name" validate:"required"`
	Description string `json:"description"`
}

type CreateResourceServerScopeRequestDto

type CreateResourceServerScopeRequestDto struct {
	Scope       string `json:"scope" validate:"required,min=1,max=255"`
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description"`
}

type CreateResourceServerScopeResponseDto

type CreateResourceServerScopeResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type CreateRoleRequestDto

type CreateRoleRequestDto struct {
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description" validate:"max=1024"`
}

type CreateRoleResponseDto

type CreateRoleResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type CreateServiceUserRequestDto

type CreateServiceUserRequestDto struct {
	Username string `json:"username" validate:"required,min=1,max=255"`
}

type CreateServiceUserResponseDto

type CreateServiceUserResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type CreateUserRequestDto

type CreateUserRequestDto struct {
	Username      string                       `json:"username" validate:"required"`
	DisplayName   string                       `json:"displayName" validate:"required"`
	Email         string                       `json:"email" validate:"required"`
	EmailVerified bool                         `json:"emailVerified" validate:"required"`
	Password      *CreateUserRequestDtoPasword `json:"password"`
}

type CreateUserRequestDtoPasword

type CreateUserRequestDtoPasword struct {
	Plain     string `json:"plain" validate:"required"`
	Temporary bool   `json:"temporary"`
}

type CreateUserResponseDto

type CreateUserResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type CreateVirtualServerRequestDto

type CreateVirtualServerRequestDto struct {
	Name               string  `json:"name" validate:"required,min=1,max=255,alphanum"`
	DisplayName        string  `json:"displayName" validate:"required,min=1,max=255"`
	EnableRegistration bool    `json:"enableRegistration"`
	SigningAlgorithm   *string `json:"signingAlgorithm" validate:"oneof=RS256 EdDSA"`
	Require2fa         bool    `json:"require2fa"`

	Admin        *CreateVirtualServerRequestDtoAdminDto        `json:"admin"`
	ServiceUsers []CreateVirtualServerRequestDtoServiceUserDto `json:"serviceUsers"`
	Projects     []CreateVirtualServerRequestDtoProjectDto     `json:"projects"`
}

type CreateVirtualServerRequestDtoAdminDto

type CreateVirtualServerRequestDtoAdminDto struct {
	Username     string   `json:"username" validate:"required,min=1,max=255"`
	DisplayName  string   `json:"displayName" validate:"required,min=1,max=255"`
	PrimaryEmail string   `json:"primaryEmail" validate:"required,email"`
	PasswordHash string   `json:"passwordHash" validate:"required"`
	Roles        []string `json:"roles"`
}

type CreateVirtualServerRequestDtoProjectDto

type CreateVirtualServerRequestDtoProjectDto struct {
	Slug        string `json:"slug" validate:"required,min=1,max=255"`
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description"`

	Roles           []CreateVirtualServerRequestDtoProjectDtoRoleDto           `json:"roles"`
	Applications    []CreateVirtualServerRequestDtoProjectDtoApplicationDto    `json:"applications"`
	ResourceServers []CreateVirtualServerRequestDtoProjectDtoResourceServerDto `json:"resourceServers"`
}

type CreateVirtualServerRequestDtoProjectDtoApplicationDto

type CreateVirtualServerRequestDtoProjectDtoApplicationDto struct {
	Name           string   `json:"name" validate:"required,min=1,max=255"`
	DisplayName    string   `json:"displayName" validate:"required,min=1,max=255"`
	Type           string   `json:"type" validate:"required,oneof=public confidential"`
	HashedSecret   *string  `json:"hashedSecret"`
	RedirectUris   []string `json:"redirectUris" validate:"required,dive,url,min=1"`
	PostLogoutUris []string `json:"postLogoutUris" validate:"dive,url"`
}

type CreateVirtualServerRequestDtoProjectDtoResourceServerDto

type CreateVirtualServerRequestDtoProjectDtoResourceServerDto struct {
	Slug        string `json:"slug" validate:"required,min=1,max=255"`
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description"`
}

type CreateVirtualServerRequestDtoProjectDtoRoleDto

type CreateVirtualServerRequestDtoProjectDtoRoleDto struct {
	Name        string `json:"name" validate:"required,min=1,max=255"`
	Description string `json:"description"`
}

type CreateVirtualServerRequestDtoServiceUserDto

type CreateVirtualServerRequestDtoServiceUserDto struct {
	Username  string   `json:"username" validate:"required,min=1,max=255"`
	Roles     []string `json:"roles"`
	PublicKey struct {
		Pem string `json:"pem" validate:"required"`
		Kid string `json:"kid" validate:"required"`
	} `json:"publicKey" validate:"required"`
}

type DeviceAuthorizationResponse

type DeviceAuthorizationResponse struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	VerificationUri         string `json:"verification_uri"`
	VerificationUriComplete string `json:"verification_uri_complete"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
}

type DeviceTokenResponse

type DeviceTokenResponse struct {
	TokenType    string `json:"token_type"`
	IdToken      string `json:"id_token"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	ExpiresIn    int    `json:"expires_in"`
}

type GetApplicationResponseDto

type GetApplicationResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	DisplayName string    `json:"displayName"`
	Type        string    `json:"type"`

	RedirectUris           []string `json:"redirectUris"`
	PostLogoutRedirectUris []string `json:"postLogoutRedirectUris"`

	SystemApplication bool `json:"systemApplication"`

	ClaimsMappingScript *string `json:"customClaimsMappingScript"`

	DeviceFlowEnabled bool `json:"deviceFlowEnabled"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type GetProjectResponseDto

type GetProjectResponseDto struct {
	Id            uuid.UUID `json:"id"`
	Slug          string    `json:"slug"`
	Name          string    `json:"name"`
	Description   string    `json:"description"`
	SystemProject bool      `json:"systemProject"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type GetResourceServerResponseDto

type GetResourceServerResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Slug        string    `json:"slug"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type GetResourceServerScopeResponseDto

type GetResourceServerScopeResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Scope       string    `json:"scope"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type GetRoleByIdResponseDto

type GetRoleByIdResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type GetTemplateResponseDto

type GetTemplateResponseDto struct {
	Id        uuid.UUID `json:"id"`
	Type      string    `json:"type"`
	Text      string    `json:"text"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type GetUserApplicationMetadataResponseDto

type GetUserApplicationMetadataResponseDto map[string]any

type GetUserByIdResponseDto

type GetUserByIdResponseDto struct {
	Id            uuid.UUID `json:"id"`
	Username      string    `json:"username"`
	DisplayName   string    `json:"displayName"`
	PrimaryEmail  string    `json:"primaryEmail"`
	EmailVerified bool      `json:"emailVerified"`
	IsServiceUser bool      `json:"isServiceUser"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

type GetUserGlobalMetadataResponseDto

type GetUserGlobalMetadataResponseDto map[string]any

type GetUserMetadataResponseDto

type GetUserMetadataResponseDto struct {
	Metadata            map[string]any `json:"metadata,omitempty"`
	ApplicationMetadata map[string]any `json:"applicationMetadata,omitempty"`
}

type GetVirtualServerListResponseDto

type GetVirtualServerListResponseDto struct {
	Name                string `json:"name"`
	DisplayName         string `json:"displayName"`
	RegistrationEnabled bool   `json:"registrationEnabled"`
}

type GetVirtualServerResponseDto

type GetVirtualServerResponseDto struct {
	Id                       uuid.UUID `json:"id"`
	Name                     string    `json:"name"`
	DisplayName              string    `json:"displayName"`
	RegistrationEnabled      bool      `json:"registrationEnabled"`
	Require2fa               bool      `json:"require2fa"`
	RequireEmailVerification bool      `json:"requireEmailVerification"`
	SigningAlgorithm         string    `json:"signingAlgorithm"`
	CreatedAt                time.Time `json:"createdAt"`
	UpdatedAt                time.Time `json:"updatedAt"`
}

type ListApplicationsResponseDto

type ListApplicationsResponseDto struct {
	Id                uuid.UUID `json:"id"`
	Name              string    `json:"name"`
	DisplayName       string    `json:"displayName"`
	Type              string    `json:"type"`
	SystemApplication bool      `json:"systemApplication"`
}

type ListAuditLogResponseDto

type ListAuditLogResponseDto struct {
	Id     uuid.UUID  `json:"id"`
	UserId *uuid.UUID `json:"userId"`

	RequestType  string          `json:"requestType"`
	RequestData  map[string]any  `json:"requestData"`
	ResponseData *map[string]any `json:"responseData"`

	Allowed         bool            `json:"allowed"`
	AllowReasonType *string         `json:"allowReasonType"`
	AllowReason     *map[string]any `json:"allowReason"`

	CreatedAt time.Time `json:"createdAt"`
}

type ListGroupsResponseDto

type ListGroupsResponseDto struct {
	Id   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

type ListPasskeyResponseDto

type ListPasskeyResponseDto struct {
	Id uuid.UUID `json:"id"`
}

type ListPasswordRulesResponseDto

type ListPasswordRulesResponseDto struct {
	Id      uuid.UUID      `json:"id"`
	Type    string         `json:"type"`
	Details map[string]any `json:"details"`
}

type ListProjectsResponseDto

type ListProjectsResponseDto struct {
	Id            uuid.UUID `json:"id"`
	Slug          string    `json:"slug"`
	Name          string    `json:"name"`
	SystemProject bool      `json:"systemProject"`
}

type ListResourceServerScopesResponseDto

type ListResourceServerScopesResponseDto struct {
	Id    uuid.UUID `json:"id"`
	Scope string    `json:"scope"`
	Name  string    `json:"name"`
}

type ListResourceServersResponseDto

type ListResourceServersResponseDto struct {
	Id   uuid.UUID `json:"id"`
	Slug string    `json:"slug"`
	Name string    `json:"name"`
}

type ListRolesResponseDto

type ListRolesResponseDto struct {
	Id   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

type ListTemplatesResponseDto

type ListTemplatesResponseDto struct {
	Id   uuid.UUID `json:"id"`
	Type string    `json:"type"`
}

type ListUsersInRoleResponseDto

type ListUsersInRoleResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Username    string    `json:"username"`
	DisplayName string    `json:"displayName"`
}

type ListUsersResponseDto

type ListUsersResponseDto struct {
	Id            uuid.UUID `json:"id"`
	Username      string    `json:"username"`
	DisplayName   string    `json:"displayName"`
	PrimaryEmail  string    `json:"primaryEmail"`
	IsServiceUser bool      `json:"isServiceUser"`
}

type PagedAuditLogResponseDto

type PagedAuditLogResponseDto struct {
	Items      []ListAuditLogResponseDto `json:"items"`
	Pagination Pagination                `json:"pagination"`
}

type PagedGroupsResponseDto

type PagedGroupsResponseDto = PagedResponseDto[ListGroupsResponseDto]

type PagedListPasskeyResponseDto

type PagedListPasskeyResponseDto struct {
	Items []ListPasskeyResponseDto `json:"items"`
}

type PagedPasswordRuleResponseDto

type PagedPasswordRuleResponseDto struct {
	Items []ListPasswordRulesResponseDto `json:"items"`
}

type PagedResponseDto

type PagedResponseDto[T any] struct {
	Items      []T         `json:"items"`
	Pagination *Pagination `json:"pagination"`
}

type PagedRolesResponseDto

type PagedRolesResponseDto struct {
	Items      []ListRolesResponseDto `json:"items"`
	Pagination Pagination             `json:"pagination"`
}

type PagedTemplatesResponseDto

type PagedTemplatesResponseDto struct {
	Items      []ListTemplatesResponseDto `json:"items"`
	Pagination Pagination                 `json:"pagination"`
}

PagedTemplatesResponseDto is the paged envelope for ListTemplates.

type PagedUsersResponseDto

type PagedUsersResponseDto struct {
	Items      []ListUsersResponseDto `json:"items"`
	Pagination Pagination             `json:"pagination"`
}

type Pagination

type Pagination struct {
	Size       int `json:"size"`
	Page       int `json:"page"`
	TotalPages int `json:"totalPages"`
	TotalItems int `json:"totalItems"`
}

type PasskeyCreateChallengeResponseDto

type PasskeyCreateChallengeResponseDto struct {
	Id          uuid.UUID `json:"id"`
	Challenge   string    `json:"challenge" validate:"required"`
	UserId      uuid.UUID `json:"userId"`
	Username    string    `json:"username"`
	DisplayName string    `json:"displayName"`
}

type PasskeyValidateChallengeRequestDto

type PasskeyValidateChallengeRequestDto struct {
	Id               uuid.UUID `json:"id" validate:"required"`
	WebauthnResponse struct {
		Id       string `json:"id"`
		RawId    string `json:"rawId"`
		Response struct {
			ClientDataJSON     string   `json:"clientDataJSON"`
			AuthenticatorData  string   `json:"authenticatorData"`
			Transports         []string `json:"transports"`
			PublicKey          string   `json:"publicKey"`
			PublicKeyAlgorithm int      `json:"publicKeyAlgorithm"`
			AttestationObject  string   `json:"attestationObject"`
		} `json:"response"`
		AuthenticatorAttachment string `json:"authenticatorAttachment"`
		Type                    string `json:"type"`
	} `json:"webauthnResponse" validate:"required"`
}

type PatchApplicationRequestDto

type PatchApplicationRequestDto struct {
	DisplayName         *string `json:"displayName"`
	ClaimsMappingScript *string `json:"customClaimsMappingScript"`
	DeviceFlowEnabled   *bool   `json:"deviceFlowEnabled"`
}

type PatchPasswordRuleRequestDto

type PatchPasswordRuleRequestDto map[string]any

type PatchUserApplicationMetadataRequestDto

type PatchUserApplicationMetadataRequestDto map[string]any

type PatchUserGlobalMetadataRequestDto

type PatchUserGlobalMetadataRequestDto map[string]any

type PatchUserRequestDto

type PatchUserRequestDto struct {
	DisplayName   *string `json:"displayName"`
	EmailVerified *bool   `json:"emailVerified"`
}

type PatchVirtualServerRequestDto

type PatchVirtualServerRequestDto struct {
	DisplayName *string `json:"displayName"`

	EnableRegistration       *bool `json:"enableRegistration"`
	Require2fa               *bool `json:"require2fa"`
	RequireEmailVerification *bool `json:"requireEmailVerification"`
}

type RegisterUserRequestDto

type RegisterUserRequestDto struct {
	Username    string `json:"username" validate:"required,min=1,max=255"`
	DisplayName string `json:"displayName" validate:"required,min=1,max=255"`
	Password    string `json:"password" validate:"required"`
	Email       string `json:"email" validate:"required"`
}

type UpdateUserApplicationMetadataRequestDto

type UpdateUserApplicationMetadataRequestDto map[string]any

type UpdateUserGlobalMetadataRequestDto

type UpdateUserGlobalMetadataRequestDto map[string]any

Jump to

Keyboard shortcuts

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