feat(auth): AuthCapabilitiesResponse DTO
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.cameleer.server.app.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "Authentication capabilities reported to the SPA so it can render the login page deterministically")
|
||||
public record AuthCapabilitiesResponse(
|
||||
@Schema(description = "OIDC interactive login capability") Oidc oidc,
|
||||
@Schema(description = "Local username/password account capability") LocalAccounts localAccounts
|
||||
) {
|
||||
|
||||
@Schema(description = "OIDC interactive login")
|
||||
public record Oidc(
|
||||
@Schema(description = "Whether OIDC is configured AND enabled") boolean enabled,
|
||||
@Schema(description = "Best-effort display label, e.g. \"Logto\", \"Keycloak\", \"Single Sign-On\"") String providerName,
|
||||
@Schema(description = "When true, OIDC is the canonical entry point and the SPA hides the local form unless ?local is set") boolean primary
|
||||
) {}
|
||||
|
||||
@Schema(description = "Local username/password accounts")
|
||||
public record LocalAccounts(
|
||||
@Schema(description = "Whether the local form is reachable at all") boolean enabled,
|
||||
@Schema(description = "When true, the SPA gates the local form behind ?local with an admin-recovery banner") boolean adminRecoveryOnly
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user