Documentation
¶
Index ¶
- Constants
- Variables
- func ActivateSuccess(w http.ResponseWriter, r *http.Request)
- func ApplicationHealth(w http.ResponseWriter, _ *http.Request)
- func AssignRole(w http.ResponseWriter, r *http.Request)
- func AssociateServiceUserPublicKey(w http.ResponseWriter, r *http.Request)
- func BeginAuthorizationFlow(w http.ResponseWriter, r *http.Request)
- func BeginDeviceFlow(w http.ResponseWriter, r *http.Request)
- func CreateApplication(w http.ResponseWriter, r *http.Request)
- func CreatePasswordRule(w http.ResponseWriter, r *http.Request)
- func CreateProject(w http.ResponseWriter, r *http.Request)
- func CreateResourceServer(w http.ResponseWriter, r *http.Request)
- func CreateResourceServerScope(w http.ResponseWriter, r *http.Request)
- func CreateRole(w http.ResponseWriter, r *http.Request)
- func CreateServiceUser(w http.ResponseWriter, r *http.Request)
- func CreateUser(w http.ResponseWriter, r *http.Request)
- func CreateVirtualServer(w http.ResponseWriter, r *http.Request)
- func Debug(w http.ResponseWriter, r *http.Request)
- func DeleteActiveSession(w http.ResponseWriter, r *http.Request)
- func DeleteApplication(w http.ResponseWriter, r *http.Request)
- func DetermineNextLoginStep(ctx context.Context, loginInfo *jsonTypes.LoginInfo) (jsonTypes.LoginStep, error)
- func ExpvarVars(w http.ResponseWriter, r *http.Request)
- func FinishLogin(w http.ResponseWriter, r *http.Request)
- func FinishPasskeyLogin(w http.ResponseWriter, r *http.Request)
- func GetActivatePage(w http.ResponseWriter, r *http.Request)
- func GetApplication(w http.ResponseWriter, r *http.Request)
- func GetLoginState(w http.ResponseWriter, r *http.Request)
- func GetProject(w http.ResponseWriter, r *http.Request)
- func GetResourceServer(w http.ResponseWriter, r *http.Request)
- func GetResourceServerScope(w http.ResponseWriter, r *http.Request)
- func GetRoleById(w http.ResponseWriter, r *http.Request)
- func GetTemplate(w http.ResponseWriter, r *http.Request)
- func GetUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
- func GetUserById(w http.ResponseWriter, r *http.Request)
- func GetUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
- func GetUserMetadata(w http.ResponseWriter, r *http.Request)
- func GetVirtualServer(w http.ResponseWriter, r *http.Request)
- func GetVirtualServerPublicInfo(w http.ResponseWriter, r *http.Request)
- func ListActiveSessions(w http.ResponseWriter, r *http.Request)
- func ListApplications(w http.ResponseWriter, r *http.Request)
- func ListAuditLog(w http.ResponseWriter, r *http.Request)
- func ListGroups(w http.ResponseWriter, r *http.Request)
- func ListPasskeys(w http.ResponseWriter, r *http.Request)
- func ListPasswordRules(w http.ResponseWriter, r *http.Request)
- func ListProjects(w http.ResponseWriter, r *http.Request)
- func ListResourceServerScopes(w http.ResponseWriter, r *http.Request)
- func ListResourceServers(w http.ResponseWriter, r *http.Request)
- func ListRoles(w http.ResponseWriter, r *http.Request)
- func ListTemplates(w http.ResponseWriter, r *http.Request)
- func ListUsers(w http.ResponseWriter, r *http.Request)
- func ListUsersInRole(w http.ResponseWriter, r *http.Request)
- func OidcEndSession(w http.ResponseWriter, r *http.Request)
- func OidcToken(w http.ResponseWriter, r *http.Request)
- func OidcUserinfo(w http.ResponseWriter, r *http.Request)
- func OnboardTotp(w http.ResponseWriter, r *http.Request)
- func PasskeyCreateChallenge(w http.ResponseWriter, r *http.Request)
- func PasskeyValidateCreateChallengeResponse(w http.ResponseWriter, r *http.Request)
- func PatchApplication(w http.ResponseWriter, r *http.Request)
- func PatchUser(w http.ResponseWriter, r *http.Request)
- func PatchUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
- func PatchUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
- func PatchVirtualServer(w http.ResponseWriter, r *http.Request)
- func PostActivatePage(w http.ResponseWriter, r *http.Request)
- func PrometheusMetrics(w http.ResponseWriter, r *http.Request)
- func RegisterUser(w http.ResponseWriter, r *http.Request)
- func ResendEmailVerification(w http.ResponseWriter, r *http.Request)
- func ResetTemporaryPassword(w http.ResponseWriter, r *http.Request)
- func StartPasskeyLogin(w http.ResponseWriter, r *http.Request)
- func UpdatePasswordRule(w http.ResponseWriter, r *http.Request)
- func UpdateUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
- func UpdateUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
- func VerifyEmail(w http.ResponseWriter, r *http.Request)
- func VerifyEmailToken(w http.ResponseWriter, r *http.Request)
- func VerifyPassword(w http.ResponseWriter, r *http.Request)
- func VerifyTotp(w http.ResponseWriter, r *http.Request)
- func VirtualServerHealth(w http.ResponseWriter, _ *http.Request)
- func WellKnownJwks(w http.ResponseWriter, r *http.Request)
- func WellKnownOpenIdConfiguration(w http.ResponseWriter, r *http.Request)
- type AccessTokenGenerationParams
- type AssignRoleRequestDto
- type AssociateServiceUserPublicKeyRequestDto
- type AssociateServiceUserPublicKeyResponseDto
- type AuthorizationRequest
- type CodeFlowResponse
- type CreateApplicationRequestDto
- type CreateApplicationResponseDto
- type CreatePasswordRuleRequestDto
- type CreateProjectRequestDto
- type CreateProjectResponseDto
- type CreateResourceServerRequestDto
- type CreateResourceServerScopeRequestDto
- type CreateResourceServerScopeResponseDto
- type CreateRoleRequestDto
- type CreateRoleResponseDto
- type CreateServiceUserRequestDto
- type CreateServiceUserResponseDto
- type CreateUserRequestDto
- type CreateUserRequestDtoPasword
- type CreateUserResponseDto
- type CreateVirtualServerRequestDto
- type CreateVirtualServerRequestDtoAdminDto
- type CreateVirtualServerRequestDtoProjectDto
- type CreateVirtualServerRequestDtoProjectDtoApplicationDto
- type CreateVirtualServerRequestDtoProjectDtoResourceServerDto
- type CreateVirtualServerRequestDtoProjectDtoRoleDto
- type CreateVirtualServerRequestDtoServiceUserDto
- type Data
- type DeviceAuthorizationResponse
- type Ed25519JWK
- type FinishPasskeyLoginRequestDto
- type GeneratedTokens
- type GetApplicationResponseDto
- type GetLoginStateResponseDto
- type GetProjectResponseDto
- type GetResourceServerResponseDto
- type GetResourceServerScopeResponseDto
- type GetRoleByIdResponseDto
- type GetTemplateResponseDto
- type GetUserApplicationMetadataResponseDto
- type GetUserByIdResponseDto
- type GetUserGlobalMetadataResponseDto
- type GetUserMetadataResponseDto
- type GetVirtualServerListResponseDto
- type GetVirtualServerResponseDto
- type IdTokenGenerationParams
- type JwksResponseDto
- type ListApplicationsResponseDto
- type ListAuditLogResponseDto
- type ListGroupsResponseDto
- type ListPasskeyResponseDto
- type ListPasswordRulesResponseDto
- type ListProjectsResponseDto
- type ListResourceServerScopesResponseDto
- type ListResourceServersResponseDto
- type ListRolesResponseDto
- type ListTemplatesResponseDto
- type ListUsersInRoleResponseDto
- type ListUsersResponseDto
- type OidcError
- type OidcUserInfoResponseDto
- type OnboardTotpRequestDto
- type OpenIdConfigurationResponseDto
- type PagedApplicationsResponseDto
- type PagedAuditLogResponseDto
- type PagedGroupsResponseDto
- type PagedListPasskeyResponseDto
- type PagedPasswordRuleResponseDto
- type PagedProjectsResponseDto
- type PagedResourceServerScopeResponseDto
- type PagedResourceServersResponseDto
- type PagedResponseDto
- type PagedRolesResponseDto
- type PagedTemplatesResponseDto
- type PagedUsersInRoleResponseDto
- type PagedUsersResponseDto
- type Pagination
- type PasskeyCreateChallengeResponseDto
- type PasskeyValidateChallengeRequestDto
- type PatchApplicationRequestDto
- type PatchPasswordRuleRequestDto
- type PatchUserApplicationMetadataRequestDto
- type PatchUserGlobalMetadataRequestDto
- type PatchUserRequestDto
- type PatchVirtualServerRequestDto
- type QueryOps
- type RS256JWK
- type RefreshTokenGenerationParams
- type RefreshTokenResponse
- type RegisterUserRequestDto
- type ResetTemporaryPasswordRequestDto
- type StartPasskeyLoginResponseDto
- type TokenExchangeResponse
- type TokenGenerationParams
- type UpdateUserApplicationMetadataRequestDto
- type UpdateUserGlobalMetadataRequestDto
- type VerifyPasswordRequestDto
- type VerifyTotpRequestDto
Constants ¶
const ( CoseAlgorithmES256 = -7 CoseAlgorithmEd25519 = -8 // COSE calls this EdDSA and marks it as deprecated, but implementations seem to use it for Ed25519 instead of -19 (which is what COSE uses for Ed25519) CoseAlgorithmPS256 = -37 CoseAlgorithmRS256 = -257 )
Variables ¶
var (
ErrMissingEmailVerificationToken = fmt.Errorf("missing email verification token: %w", utils.ErrHttpBadRequest)
)
var ErrSignatureInvalid = fmt.Errorf("signature verification failed: %w", utils.ErrHttpUnauthorized)
var ErrSignatureInvalidAlgorithm = errors.New("invalid public key algorithm")
Functions ¶
func ActivateSuccess ¶
func ActivateSuccess(w http.ResponseWriter, r *http.Request)
func ApplicationHealth ¶
func ApplicationHealth(w http.ResponseWriter, _ *http.Request)
ApplicationHealth returns 200 when the service is up. @Summary Application health @Tags System @Produce plain @Success 200 {string} string "OK" @Router /health [get]
func AssignRole ¶
func AssignRole(w http.ResponseWriter, r *http.Request)
AssignRole @summary Assign role to user @description Assign an existing role to a user within a project. @tags Roles @accept application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param projectSlug path string true "Project slug" @param roleId path string true "Role ID (UUID)" @param body body handlers.AssignRoleRequestDto true "Assignment data" @security BearerAuth @success 204 {string} string "No Content" @failure 400 {string} string "Bad Request" @failure 404 {string} string "Not Found" @router /api/virtual-servers/{virtualServerName}/projects/{projectSlug}/roles/{roleId}/assign [post]
func AssociateServiceUserPublicKey ¶
func AssociateServiceUserPublicKey(w http.ResponseWriter, r *http.Request)
AssociateServiceUserPublicKey associates a public key with a service user. @Summary Associate a public key with a service user @Tags Users @Accept json @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param body body AssociateServiceUserPublicKeyRequestDto true "Public key data" @Success 200 {object} AssociateServiceUserPublicKeyResponseDto @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users/service-users/{serviceUserId}/keys [post]
func BeginAuthorizationFlow ¶
func BeginAuthorizationFlow(w http.ResponseWriter, r *http.Request)
BeginAuthorizationFlow starts the OIDC authorization code flow. @Summary Authorize @Description Starts the Authorization Code flow. If the user is not authenticated, redirects to your login UI; otherwise redirects to the application's redirect_uri with an authorization code. @Tags OIDC @Produce plain @Accept application/x-www-form-urlencoded @Param virtualServerName path string true "Virtual server name" default(keyline) @Param response_type query string true "Must be 'code'" @Param client_id query string true "Application (client) ID" @Param redirect_uri query string true "Registered redirect URI" @Param scope query string true "Space-delimited scopes (must include 'openid')" @Param state query string false "Opaque value returned to client" @Param response_mode query string false "e.g. 'query'" @Param code_challenge query string false "PKCE code challenge" @Param code_challenge_method query string false "S256 or plain" Enums(S256,plain) @Success 302 {string} string "Redirect to redirect_uri with code (& state)" @Failure 400 {string} string @Router /oidc/{virtualServerName}/authorize [get] @Router /oidc/{virtualServerName}/authorize [post]
func BeginDeviceFlow ¶
func BeginDeviceFlow(w http.ResponseWriter, r *http.Request)
func CreateApplication ¶
func CreateApplication(w http.ResponseWriter, r *http.Request)
CreateApplication creates a new application (OIDC client) in a project @Summary Create application @Description Create a new OIDC application/client with redirect URIs and type @Tags Applications @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param request body CreateApplicationRequestDto true "Application data" @Success 201 {object} CreateApplicationResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/applications [post]
func CreatePasswordRule ¶
func CreatePasswordRule(w http.ResponseWriter, r *http.Request)
CreatePasswordRule @summary Create password rule @description Create a password rule for a virtual server. @tags Password rules @accept application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param body body CreatePasswordRuleRequestDto true "Password rule details" @success 204 "No Content" @failure 400 {string} string "Bad Request" @failure 409 {string} string "Conflict" @router /api/virtual-servers/{virtualServerName}/password-policies/rules/{ruleType} [post]
func CreateProject ¶
func CreateProject(w http.ResponseWriter, r *http.Request)
CreateProject creates a new project @Summary Create project @Description Create a new project @Tags Projects @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param request body CreateProjectRequestDto true "Application data" @Success 201 {object} CreateProjectResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects [post]
func CreateResourceServer ¶
func CreateResourceServer(w http.ResponseWriter, r *http.Request)
CreateResourceServer creates a new resource server (API/(micro-)service) in a project @Summary Create resource server @Description Create a new resource server @Tags Resource servers @Accept json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param request body CreateResourceServerRequestDto true "Application data" @Success 204 {string} string "No Content" @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-servers [post]
func CreateResourceServerScope ¶
func CreateResourceServerScope(w http.ResponseWriter, r *http.Request)
CreateResourceServerScope creates a new scope for a resource server @Summary Create resource server scope @Description Create a new scope for a resource server @Tags Resource server scopes @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param resourceServerId path string true "Resource server ID (UUID)" @Param request body CreateResourceServerScopeRequestDto true "Application data" @Success 201 {object} CreateResourceServerScopeResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-server/{resourceServerId}/scopes [post]
func CreateRole ¶
func CreateRole(w http.ResponseWriter, r *http.Request)
CreateRole @summary Create role @description Create a new role within a project. @tags Roles @accept application/json @produce application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param projectSlug path string true "Project slug" @param body body handlers.CreateRoleRequestDto true "Role data" @security BearerAuth @success 201 {object} handlers.CreateRoleResponseDto @failure 400 {string} string "Bad Request" @router /api/virtual-servers/{virtualServerName}/projects/{projectSlug}/roles [post]
func CreateServiceUser ¶
func CreateServiceUser(w http.ResponseWriter, r *http.Request)
CreateServiceUser create a service user. @Summary Create service user @Tags Users @Accept json @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param body body CreateServiceUserRequestDto true "User data" @Success 200 {object} CreateServiceUserResponseDto @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users/service-users [post]
func CreateUser ¶
func CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser creates a new user. @Summary Create user @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param body body CreateUserRequestDto true "User data" @Success 201 {object} CreateUserResponseDto @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users [post]
func CreateVirtualServer ¶
func CreateVirtualServer(w http.ResponseWriter, r *http.Request)
CreateVirtualServer creates a new virtual server. @Summary Create virtual server @Tags Admin @Accept json @Produce json @Param body body handlers.CreateVirtualServerRequestDto true "Virtual server" @Success 204 {string} string "No Content" @Failure 400 {string} string @Router /api/virtual-servers [post]
func Debug ¶
func Debug(w http.ResponseWriter, r *http.Request)
Debug renders a test email template and returns 200. @Summary Debug email template render @Tags Debug @Produce plain @Success 200 {string} string "OK" @Failure 500 {string} string @Router /debug [get]
func DeleteActiveSession ¶
func DeleteActiveSession(w http.ResponseWriter, r *http.Request)
func DeleteApplication ¶
func DeleteApplication(w http.ResponseWriter, r *http.Request)
DeleteApplication deletes a specific application by ID @Summary Delete application @Description Delete an application by ID from a project @Tags Applications @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param appId path string true "Application ID (UUID)" @Success 204 {string} string "No Content" @Failure 400 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/applications/{appId} [delete]
func DetermineNextLoginStep ¶
func DetermineNextLoginStep( ctx context.Context, loginInfo *jsonTypes.LoginInfo, ) (jsonTypes.LoginStep, error)
DetermineNextLoginStep decides what the next login step should be based on the current step, user state, and server configuration.
func ExpvarVars ¶
func ExpvarVars(w http.ResponseWriter, r *http.Request)
ExpvarVars proxies the standard expvar handler. @Summary Expvar variables @Description Exposes runtime/app stats (Go's expvar) as JSON. @Tags Debug @Produce json @Success 200 {string} string "expvar JSON" @Router /debug/vars [get]
func FinishLogin ¶
func FinishLogin(w http.ResponseWriter, r *http.Request)
FinishLogin creates a session and redirects to the original URL. @Summary Finish login @Tags Logins @Produce plain @Param loginToken path string true "Login session token" @Success 302 {string} string "Redirect to original URL" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/finish-login [post]
func FinishPasskeyLogin ¶
func FinishPasskeyLogin(w http.ResponseWriter, r *http.Request)
func GetActivatePage ¶
func GetActivatePage(w http.ResponseWriter, r *http.Request)
func GetApplication ¶
func GetApplication(w http.ResponseWriter, r *http.Request)
GetApplication retrieves details of a specific application by ID @Summary Get application @Description Get an application by ID from a project @Tags Applications @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param appId path string true "Application ID (UUID)" @Success 200 {object} GetApplicationResponseDto @Failure 400 @Failure 404 "Application not found" @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/applications/{appId} [get]
func GetLoginState ¶
func GetLoginState(w http.ResponseWriter, r *http.Request)
GetLoginState returns the current step of the login session. @Summary Get login state @Tags Logins @Produce json @Param loginToken path string true "Login session token" @Success 200 {object} handlers.GetLoginStateResponseDto @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unknown/invalid token" @Router /logins/{loginToken} [get]
func GetProject ¶
func GetProject(w http.ResponseWriter, r *http.Request)
func GetResourceServer ¶
func GetResourceServer(w http.ResponseWriter, r *http.Request)
GetResourceServer retrieves details of a specific resource server by ID @Summary Get resource server @Description Get a resource server by ID from a project @Tags Resource servers @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param resourceServerId path string true "Resource server ID (UUID)" @Success 200 {object} GetResourceServerResponseDto @Failure 400 @Failure 404 "Resource server not found" @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-servers/{resourceServerId} [get]
func GetResourceServerScope ¶
func GetResourceServerScope(w http.ResponseWriter, r *http.Request)
GetResourceServerScope retrieves details of a specific resource server scope by ID @Summary Get resource server scope @Description Get a resource server scope by ID from a project @Tags Resource server scopes @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param resourceServerId path string true "Resource server ID (UUID)" @Param scopeId path string true "Scope ID (UUID)" @Success 200 {object} GetResourceServerScopeResponseDto @Failure 400 @Failure 404 "Resource server scope not found" @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-server/{resourceServerId}/scopes/{scopeId} [get]
func GetRoleById ¶
func GetRoleById(w http.ResponseWriter, r *http.Request)
GetRoleById @summary Get role @description Get a role by its ID within a project. @tags Roles @produce application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param projectSlug path string true "Project slug" @param roleId path string true "Role ID (UUID)" @security BearerAuth @success 200 {object} handlers.GetRoleByIdResponseDto @failure 400 {string} string "Bad Request" @failure 404 {string} string "Not Found" @router /api/virtual-servers/{virtualServerName}/projects/{projectSlug}/roles/{roleId} [get]
func GetTemplate ¶
func GetTemplate(w http.ResponseWriter, r *http.Request)
GetTemplate returns a single template by type. @Summary Get template @Tags Templates @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param templateType path string true "Template type" @Success 200 {object} GetTemplateResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/templates/{templateType} [get]
func GetUserApplicationMetadata ¶
func GetUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
GetUserApplicationMetadata returns a users application metadata. @Summary Get users application metadata @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param appId path string true "Application ID (UUID)" @Success 200 {object} GetUserApplicationMetadataResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/application/{appId} [get]
func GetUserById ¶
func GetUserById(w http.ResponseWriter, r *http.Request)
GetUserById returns a user by ID. @Summary Get user @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Success 200 {object} GetUserByIdResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId} [get]
func GetUserGlobalMetadata ¶
func GetUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
GetUserGlobalMetadata returns a users metadata (only the global metadata). @Summary Get user metadata (only global) @Tags Users @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Success 200 {object} GetUserGlobalMetadataResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/user [get]
func GetUserMetadata ¶
func GetUserMetadata(w http.ResponseWriter, r *http.Request)
GetUserMetadata returns a users metadata. @Summary Get user metadata @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Success 200 {object} GetUserMetadataResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata [get]
func GetVirtualServer ¶
func GetVirtualServer(w http.ResponseWriter, r *http.Request)
GetVirtualServer returns details of a virtual server. @Summary Get virtual server @Tags Admin @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {object} handlers.GetVirtualServerResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName} [get]
func GetVirtualServerPublicInfo ¶
func GetVirtualServerPublicInfo(w http.ResponseWriter, r *http.Request)
GetVirtualServerPublicInfo returns public info of a virtual server. @Summary Get virtual server public info @Tags Admin @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {object} handlers.GetVirtualServerListResponseDto @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/public-info [get]
func ListActiveSessions ¶
func ListActiveSessions(w http.ResponseWriter, r *http.Request)
func ListApplications ¶
func ListApplications(w http.ResponseWriter, r *http.Request)
ListApplications lists applications in a project @Summary List applications @Description Retrieve a paginated list of applications (OIDC clients) @Tags Applications @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedApplicationsResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/applications [get]
func ListAuditLog ¶
func ListAuditLog(w http.ResponseWriter, r *http.Request)
ListAuditLog @summary List audit log entries @description Retrieve a paginated list of audit log entries within a virtual server. @tags Audit @produce application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param page query int false "Page number" @param pageSize query int false "Page size" @param orderBy query string false "Order by field (e.g., name, createdAt)" @param orderDir query string false "Order direction (asc|desc)" @security BearerAuth @success 200 {object} handlers.PagedAuditLogResponseDto @failure 400 {string} string "Bad Request" @router /api/virtual-servers/{virtualServerName}/audit [get]
func ListGroups ¶
func ListGroups(w http.ResponseWriter, r *http.Request)
ListGroups lists groups in a virtual server @Summary List groups @Description Retrieve a paginated list of groups @Tags Groups @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedGroupsResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/groups [get]
func ListPasskeys ¶
func ListPasskeys(w http.ResponseWriter, r *http.Request)
func ListPasswordRules ¶
func ListPasswordRules(w http.ResponseWriter, r *http.Request)
ListPasswordRules @summary List password rules @description Retrieve all password rules of a virtual server. @tags Password rules @produce application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param page query int true "Page number" default(1) @param pageSize query int true "Page size" default(10) @success 200 {object} PagedPasswordRuleResponseDto @failure 400 {string} string "Bad Request" @router /api/virtual-servers/{virtualServerName}/password-policies/rules [get]
func ListProjects ¶
func ListProjects(w http.ResponseWriter, r *http.Request)
ListProjects lists projects in a virtual server @Summary List projects @Description Retrieve a paginated list of projects @Tags Projects @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedProjectsResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects [get]
func ListResourceServerScopes ¶
func ListResourceServerScopes(w http.ResponseWriter, r *http.Request)
ListResourceServerScopes lists resource server scopes @Summary List resource server scopes @Description Retrieve a paginated list of resource server scopes @Tags Resource server scopes @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param resourceServerId path string true "Resource server ID (UUID)" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedResourceServerScopeResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-server/{resourceServerId}/scopes [get]
func ListResourceServers ¶
func ListResourceServers(w http.ResponseWriter, r *http.Request)
ListResourceServers lists resource servers in a project @Summary List resource servers @Description Retrieve a paginated list of resource servers @Tags Resource servers @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedResourceServersResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/resource-servers [get]
func ListRoles ¶
func ListRoles(w http.ResponseWriter, r *http.Request)
ListRoles @summary List roles @description Retrieve a paginated list of roles within a project. @tags Roles @produce application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param projectSlug path string true "Project slug" @param page query int false "Page number" @param pageSize query int false "Page size" @param orderBy query string false "Order by field (e.g., name, createdAt)" @param orderDir query string false "Order direction (asc|desc)" @param search query string false "Search term" @security BearerAuth @success 200 {object} handlers.PagedRolesResponseDto @failure 400 {string} string "Bad Request" @router /api/virtual-servers/{virtualServerName}/projects/{projectSlug}/roles [get]
func ListTemplates ¶
func ListTemplates(w http.ResponseWriter, r *http.Request)
ListTemplates lists available templates for the virtual server. @Summary List templates @Tags Templates @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {object} PagedTemplatesResponseDto @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/templates [get]
func ListUsers ¶
func ListUsers(w http.ResponseWriter, r *http.Request)
ListUsers returns users with optional paging/search. @Summary List users @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param search query string false "Search term" @Success 200 {object} PagedUsersResponseDto @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users [get]
func ListUsersInRole ¶
func ListUsersInRole(w http.ResponseWriter, r *http.Request)
ListUsersInRole lists users in a role @Summary List users in role @Description Retrieve a paginated list of users @Tags Roles @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param roleId path string true "Role ID (UUID)" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Param orderBy query string false "Order by field" @Param orderDir query string false "Order direction (asc|desc)" @Param search query string false "Search term" @Success 200 {object} PagedUsersInRoleResponseDto @Failure 400 @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/roles/{roleId}/users [get]
func OidcEndSession ¶
func OidcEndSession(w http.ResponseWriter, r *http.Request)
OidcEndSession ends the user session and redirects. @Summary End session @Tags OIDC @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param id_token_hint query string true "ID token hint of the current session" @Param post_logout_redirect_uri query string false "Where to redirect after logout (must be registered)" @Param state query string false "Opaque value returned to client" @Success 302 {string} string "Redirect to post_logout_redirect_uri" @Failure 400 {string} string @Router /oidc/{virtualServerName}/end_session [get]
func OidcToken ¶
func OidcToken(w http.ResponseWriter, r *http.Request)
OidcToken exchanges authorization code or refresh token for tokens. @Summary Token endpoint @Tags OIDC @Accept application/x-www-form-urlencoded @Produce json @Param grant_type formData string true "authorization_code | refresh_token" @Param code formData string false "Required when grant_type=authorization_code" @Param refresh_token formData string false "Required when grant_type=refresh_token" @Param client_id formData string false "If no Authorization header" @Security BasicAuth @Success 200 {object} handlers.CodeFlowResponse "When grant_type=authorization_code" @Success 200 {object} handlers.RefreshTokenResponse "When grant_type=refresh_token" @Success 200 {object} handlers.TokenExchangeResponse "When grant_type=urn:ietf:params:oauth:grant-type:token-exchange" @Failure 400 {string} string @Router /oidc/{virtualServerName}/token [post]
func OidcUserinfo ¶
func OidcUserinfo(w http.ResponseWriter, r *http.Request)
OidcUserinfo returns the userinfo for the presented access token. @Summary Userinfo @Tags OIDC @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Security BearerAuth @Success 200 {object} handlers.OidcUserInfoResponseDto @Failure 401 {string} string @Router /oidc/{virtualServerName}/userinfo [post][get]
func OnboardTotp ¶
func OnboardTotp(w http.ResponseWriter, r *http.Request)
OnboardTotp advances the login after the user has onboarded TOTP. @Summary Onboard TOTP (advance state) @Tags Logins @Accept json @Produce plain @Param loginToken path string true "Login session token" @Param body body handlers.OnboardTotpRequestDto true "TOTP code" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/onboard-totp [post]
func PasskeyCreateChallenge ¶
func PasskeyCreateChallenge(w http.ResponseWriter, r *http.Request)
func PasskeyValidateCreateChallengeResponse ¶
func PasskeyValidateCreateChallengeResponse(w http.ResponseWriter, r *http.Request)
func PatchApplication ¶
func PatchApplication(w http.ResponseWriter, r *http.Request)
PatchApplication updates fields of a specific application by ID @Summary Patch application @Description Update an application by ID from a virtual server @Tags Applications @Accept json @Produce json @Param vsName path string true "Virtual server name" default(keyline) @Param projectSlug path string true "Project slug" @Param appId path string true "Application ID (UUID)" @Param request body PatchApplicationRequestDto true "Application data" @Success 204 {string} string "No Content" @Failure 400 @Failure 404 "Application not found" @Failure 500 @Router /api/virtual-servers/{vsName}/projects/{projectSlug}/applications/{appId} [patch]
func PatchUser ¶
func PatchUser(w http.ResponseWriter, r *http.Request)
PatchUser updates fields of a user. @Summary Patch user @Tags Users @Accept json @Produce plain @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param body body PatchUserRequestDto true "Patch document" @Success 204 {string} string "No Content" @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId} [patch]
func PatchUserApplicationMetadata ¶
func PatchUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
PatchUserApplicationMetadata patch a users application metadata. @Summary Patch a users application metadata using JSON Merge Patch (RFC 7396) @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param appId path string true "Application ID (UUID)" @Param body body PatchUserApplicationMetadataRequestDto true "Patch document" @Accept json @Accept application/merge-patch+json @Success 204 {string} string "No Content" @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/user [patch]
func PatchUserGlobalMetadata ¶
func PatchUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
PatchUserGlobalMetadata patch a users metadata. @Summary Patch a user metadata using JSON Merge Patch (RFC 7396) @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param body body PatchUserGlobalMetadataRequestDto true "Patch document" @Accept json @Accept application/merge-patch+json @Success 204 {string} string "No Content" @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/user [patch]
func PatchVirtualServer ¶
func PatchVirtualServer(w http.ResponseWriter, r *http.Request)
PatchVirtualServer patches a virtual server. @Summary Patch virtual server @Tags Admin @Accept json @Produce plain @Param virtualServerName path string true "Virtual server name" default(keyline) @Param body body PatchVirtualServerRequestDto true "Patch document" @Success 204 {string} string "No Content" @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName} [patch]
func PostActivatePage ¶
func PostActivatePage(w http.ResponseWriter, r *http.Request)
func PrometheusMetrics ¶
func PrometheusMetrics(w http.ResponseWriter, r *http.Request)
PrometheusMetrics proxies the promhttp handler. @Summary Prometheus metrics @Description Exposes Prometheus metrics in text exposition format. @Tags Monitoring @Produce plain @Success 200 {string} string "Prometheus exposition format (text/plain; version=0.0.4)" @Router /metrics [get]
func RegisterUser ¶
func RegisterUser(w http.ResponseWriter, r *http.Request)
RegisterUser registers a new user. @Summary Register user @Tags Users @Accept json @Produce plain @Param virtualServerName path string true "Virtual server name" default(keyline) @Param body body RegisterUserRequestDto true "User data" @Success 204 {string} string "No Content" @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users/register [post]
func ResendEmailVerification ¶
func ResendEmailVerification(w http.ResponseWriter, r *http.Request)
ResendEmailVerification sends a new email verification message. @Summary Resend email verification @Tags Logins @Produce plain @Param loginToken path string true "Login session token" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/resend-email-verification [post]
func ResetTemporaryPassword ¶
func ResetTemporaryPassword(w http.ResponseWriter, r *http.Request)
ResetTemporaryPassword sets a new password when the current one is temporary. @Summary Reset temporary password @Tags Logins @Accept json @Produce plain @Param loginToken path string true "Login session token" @Param body body handlers.ResetTemporaryPasswordRequestDto true "New password" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/reset-temporary-password [post]
func StartPasskeyLogin ¶
func StartPasskeyLogin(w http.ResponseWriter, r *http.Request)
func UpdatePasswordRule ¶
func UpdatePasswordRule(w http.ResponseWriter, r *http.Request)
UpdatePasswordRule @summary Update a password rule @description Update a password rule for a virtual server. @tags Password rules @accept application/json @param virtualServerName path string true "Virtual server name" default(keyline) @param body body PatchPasswordRuleRequestDto true "Password rule details" @success 204 "No Content" @failure 400 {string} string "Bad Request" @failure 404 {string} string "Not Found" @router /api/virtual-servers/{virtualServerName}/password-policies/rules/{ruleType} [put]
func UpdateUserApplicationMetadata ¶
func UpdateUserApplicationMetadata(w http.ResponseWriter, r *http.Request)
UpdateUserApplicationMetadata updates a users application metadata. @Summary Update a users application metadata @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param appId path string true "Application ID (UUID)" @Param body body UpdateUserApplicationMetadataRequestDto true "Metadata" @Success 204 {string} string "No Content" @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/application/{appId} [put]
func UpdateUserGlobalMetadata ¶
func UpdateUserGlobalMetadata(w http.ResponseWriter, r *http.Request)
UpdateUserGlobalMetadata updates a users metadata. @Summary Update a user metadata @Tags Users @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Param userId path string true "User ID (UUID)" @Param body body UpdateUserGlobalMetadataRequestDto true "Metadata" @Success 204 {string} string "No Content" @Failure 404 {string} string @Router /api/virtual-servers/{virtualServerName}/users/{userId}/metadata/user [put]
func VerifyEmail ¶
func VerifyEmail(w http.ResponseWriter, r *http.Request)
VerifyEmail verifies a user's email via token. @Summary Verify email @Tags Users @Produce plain @Param virtualServerName path string true "Virtual server name" default(keyline) @Param token query string true "Verification token" @Success 302 {string} string "Redirect to frontend confirmation page" @Failure 400 {string} string @Router /api/virtual-servers/{virtualServerName}/users/verify-email [get]
func VerifyEmailToken ¶
func VerifyEmailToken(w http.ResponseWriter, r *http.Request)
VerifyEmailToken advances the login after the user's email is verified. @Summary Verify email token (advance state) @Tags Logins @Produce plain @Param loginToken path string true "Login session token" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/verify-email [post]
func VerifyPassword ¶
func VerifyPassword(w http.ResponseWriter, r *http.Request)
VerifyPassword verifies user credentials for the login session. @Summary Verify password @Tags Logins @Accept json @Produce plain @Param loginToken path string true "Login session token" @Param body body handlers.VerifyPasswordRequestDto true "Credentials" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/verify-password [post]
func VerifyTotp ¶
func VerifyTotp(w http.ResponseWriter, r *http.Request)
VerifyTotp advances the login after the user has verified TOTP. @Summary Verify TOTP (advance state) @Tags Logins @Produce plain @Param loginToken path string true "Login session token" @Param body body handlers.VerifyTotpRequestDto true "TOTP code" @Success 204 {string} string "No Content" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized or wrong step" @Router /logins/{loginToken}/verify-totp [post]
func VirtualServerHealth ¶
func VirtualServerHealth(w http.ResponseWriter, _ *http.Request)
VirtualServerHealth returns 200 when the virtual server is healthy. @Summary Virtual server health @Tags System @Produce plain @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {string} string "OK" @Router /api/virtual-servers/{virtualServerName}/health [get]
func WellKnownJwks ¶
func WellKnownJwks(w http.ResponseWriter, r *http.Request)
WellKnownJwks returns the JSON Web Key Set (JWKS) for a virtual server. @Summary JWKS for virtual server @Description Returns the public keys used to verify tokens for this virtual server. @Tags OIDC @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {object} handlers.JwksResponseDto @Failure 400 {string} string @Failure 500 {string} string @Router /oidc/{virtualServerName}/.well-known/jwks.json [get]
func WellKnownOpenIdConfiguration ¶
func WellKnownOpenIdConfiguration(w http.ResponseWriter, r *http.Request)
WellKnownOpenIdConfiguration exposes the OIDC discovery document. @Summary OpenID Provider configuration @Tags OIDC @Produce json @Param virtualServerName path string true "Virtual server name" default(keyline) @Success 200 {object} handlers.OpenIdConfigurationResponseDto @Failure 400 {string} string @Router /oidc/{virtualServerName}/.well-known/openid-configuration [get]
Types ¶
type AssignRoleRequestDto ¶
type AssociateServiceUserPublicKeyRequestDto ¶
type AssociateServiceUserPublicKeyRequestDto struct {
PublicKey string `json:"publicKey" validate:"required"`
}
type AssociateServiceUserPublicKeyResponseDto ¶
type AssociateServiceUserPublicKeyResponseDto struct {
Kid string `json:"kid"`
}
type AuthorizationRequest ¶
type CodeFlowResponse ¶
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 CreateProjectRequestDto ¶
type CreateRoleRequestDto ¶
type CreateRoleResponseDto ¶
type CreateServiceUserRequestDto ¶
type CreateServiceUserRequestDto struct {
Username string `json:"username" validate:"required,min=1,max=255"`
}
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 CreateUserResponseDto ¶
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 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 Ed25519JWK ¶
type FinishPasskeyLoginRequestDto ¶
type FinishPasskeyLoginRequestDto 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"`
Signature string `json:"signature"`
UserHandle string `json:"userHandle"`
} `json:"response"`
AuthenticatorAttachment string `json:"authenticatorAttachment"`
Type string `json:"type"`
} `json:"webauthnResponse" validate:"required"`
}
type GeneratedTokens ¶
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 GetLoginStateResponseDto ¶
type GetLoginStateResponseDto struct {
// Step is one of: password_verification | temporary_password | email_verification | finish
Step string `json:"step"`
ApplicationDisplayName string `json:"applicationDisplayName"`
VirtualServerDisplayName string `json:"virtualServerDisplayName"`
VirtualServerName string `json:"virtualServerName"`
SignupEnabled bool `json:"signupEnabled"`
TotpSecret string `json:"totpSecret"`
}
type GetProjectResponseDto ¶
type GetRoleByIdResponseDto ¶
type GetTemplateResponseDto ¶
type GetTemplateResponseDto struct {
Id uuid.UUID `json:"id"`
Type repositories.TemplateType `json:"type"`
Text string `json:"text"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
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 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 IdTokenGenerationParams ¶
type JwksResponseDto ¶
type JwksResponseDto struct {
Keys []any `json:"keys"`
}
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 ListPasskeyResponseDto ¶
type ListProjectsResponseDto ¶
type ListRolesResponseDto ¶
type ListTemplatesResponseDto ¶
type ListTemplatesResponseDto struct {
Id uuid.UUID `json:"id"`
Type repositories.TemplateType `json:"type"`
}
type ListUsersResponseDto ¶
type OidcUserInfoResponseDto ¶
type OnboardTotpRequestDto ¶
type OnboardTotpRequestDto struct {
TotpCode string `json:"totpCode" validate:"required"`
}
type OpenIdConfigurationResponseDto ¶
type OpenIdConfigurationResponseDto struct {
Issuer string `json:"issuer"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserinfoEndpoint string `json:"userinfo_endpoint"`
EndSessionEndpoint string `json:"end_session_endpoint"`
DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint"`
JwksUri string `json:"jwks_uri"`
ResponseTypesSupported []string `json:"response_types_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
ScopesSupported []string `json:"scopes_supported"`
ClaimsSupported []string `json:"claims_supported"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
RequestParameterSupported bool `json:"request_parameter_supported"`
GrantTypesSupported []string `json:"grant_types_supported"`
}
type PagedApplicationsResponseDto ¶
type PagedApplicationsResponseDto = PagedResponseDto[ListApplicationsResponseDto]
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 PagedProjectsResponseDto ¶
type PagedProjectsResponseDto = PagedResponseDto[ListProjectsResponseDto]
type PagedResourceServerScopeResponseDto ¶
type PagedResourceServerScopeResponseDto = PagedResponseDto[ListResourceServerScopesResponseDto]
type PagedResourceServersResponseDto ¶
type PagedResourceServersResponseDto = PagedResponseDto[ListResourceServersResponseDto]
type PagedResponseDto ¶
type PagedResponseDto[T any] struct { Items []T `json:"items"` Pagination *Pagination `json:"pagination"` }
func NewPagedResponseDto ¶
func NewPagedResponseDto[T any](items []T, queryOps *QueryOps, totalItems int) PagedResponseDto[T]
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 PagedUsersInRoleResponseDto ¶
type PagedUsersInRoleResponseDto = PagedResponseDto[ListUsersInRoleResponseDto]
type PagedUsersResponseDto ¶
type PagedUsersResponseDto struct {
Items []ListUsersResponseDto `json:"items"`
Pagination Pagination `json:"pagination"`
}
type Pagination ¶
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 PatchUserRequestDto ¶
type QueryOps ¶
func (*QueryOps) ToOrderedQuery ¶
func (q *QueryOps) ToOrderedQuery() queries.OrderedQuery
func (*QueryOps) ToPagedQuery ¶
func (q *QueryOps) ToPagedQuery() queries.PagedQuery
type RS256JWK ¶
type RS256JWK struct {
Kty string `json:"kty"` // Key Type, e.g. "RSA"
Alg string `json:"alg"` // Algorithm, e.g. "RS256"
Use string `json:"use"` // Public key use, usually "sig"
Kid string `json:"kid"` // Key ID
N string `json:"n"` // Modulus, base64url encoded
E string `json:"e"` // Exponent, base64url encoded
}
type RefreshTokenResponse ¶
type RegisterUserRequestDto ¶
type ResetTemporaryPasswordRequestDto ¶
type ResetTemporaryPasswordRequestDto struct {
NewPassword string `json:"newPassword" validate:"required"`
}
type TokenExchangeResponse ¶
type TokenGenerationParams ¶
type TokenGenerationParams struct {
UserId uuid.UUID
VirtualServerName string
ClientId string
ApplicationId uuid.UUID
GrantedScopes []string
UserDisplayName string
UserPrimaryEmail string
ExternalUrl string
KeyPair services.KeyPair
IssuedAt time.Time
AccessTokenExpiry time.Duration
IdTokenExpiry time.Duration
RefreshTokenExpiry time.Duration
Nonce string
AuthenticatedAt time.Time
AccessTokenHeaderType string
}
func (*TokenGenerationParams) ToAccessTokenGenerationParams ¶
func (t *TokenGenerationParams) ToAccessTokenGenerationParams() AccessTokenGenerationParams
func (*TokenGenerationParams) ToIdTokenGenerationParams ¶
func (t *TokenGenerationParams) ToIdTokenGenerationParams() IdTokenGenerationParams
func (*TokenGenerationParams) ToRefreshTokenGenerationParams ¶
func (t *TokenGenerationParams) ToRefreshTokenGenerationParams() RefreshTokenGenerationParams
type VerifyTotpRequestDto ¶
type VerifyTotpRequestDto struct {
TotpCode string `json:"totpCode" validate:"required"`
}