Pular para o conteúdo principal

Referência de configurações da aplicação

Esta página descreve cada campo da página de edição da aplicação no console de administração do Casdoor. A página tem oito abas, e os campos são listados por aba, na ordem da página.

Básico​

FieldDescrição
NameInternal application name.
Display nameName shown to users.
CategoryDefault (web apps) or Agent (M2M, e.g. MCP servers, API clients).
TypeFor Default: All, OIDC, OAuth, SAML, CAS. For Agent: MCP, A2A.
Is sharedWhether the app is shared across organizations (global admin only).
LogoBranding image on the sign-in and sign-up pages (URL + preview).
Enable dark logoShows Logo dark. Turning it off clears Logo dark.
Logo darkLogo that the sign-in, sign-up, and other authentication pages show in the dark theme (URL + preview on a black background). Casdoor never takes it from the organization. Without it, the pages show Logo in the dark theme too. The organization has its own Logo dark for the sidebar of the admin console.
TitlePage title shown on the sign-in and sign-up pages.
FaviconBrowser tab icon (URL + preview).
HomeApplication homepage URL.
DescriptionShort description of the application.
OrganizationOwning organization.
TagsOnly users with one of these tags can sign in. See Application Tags.
OrderSort order in lists.
Menu modeLayout of the edit page navigation: Horizontal or Vertical.

Autenticação​

FieldDescription
Cookie expireSession cookie lifetime in hours (default: 720). Without "Remember me", the session is capped at 24 h regardless.
Sliding sessionEstenda a sessão enquanto o usuário continua usando-a, em vez de encerrá-la Cookie expire horas após o login. Veja Sessões deslizantes.
Default groupGroup automatically assigned to new users signing up through this application, including both direct sign-up and OAuth-based registration. Providers and invitations can override this per-signup: the effective group follows the priority invitation SignupGroup > provider SignupGroup > application Default group.
Default tagTag automatically assigned to new users who sign up through this application.
Enable signupAllow new accounts: on the signup page, by magic link or verification code, and on the first sign-in with one of the application's providers (whose Can signup is on). When off, only admins can create accounts.
Disable self signupShown when Enable signup is on. Users can no longer sign themselves up on the signup page, by magic link or by verification code, and the sign-in page hides the sign-up link. The signup page still works with an invitation code from an admin, and the first sign-in with a provider still creates the account. Use it to close public signup while keeping just-in-time accounts for SSO, e.g. new employees signing in with Lark or DingTalk for the first time.
Disable signinDisable all sign-in for this application.
Enable guest signinAllow unauthenticated guest access by presenting code=guest-user to the token endpoint. Requires Enable signup to be on as well. Not available for the built-in organization. See Guest authentication.
Enable exclusive signinLimit the number of active sessions of each user in this application. A new sign-in ends the older sessions and expires their tokens. See Allow one session per user.
Max sessionsShown when Enable exclusive signin is on. The number of sessions a user may keep in the application, 1 by default.
Signin sessionEnable persistent sign-in session across browser restarts.
Auto signinAutomatically sign the user back in on revisit. Requires Signin session to be enabled first.
Enable Email linkingAllow linking OAuth accounts to existing accounts by matching email.
Signup URLExternal sign-up URL, replaces Casdoor's built-in sign-up page.
Signin URLExternal sign-in URL, replaces Casdoor's built-in sign-in page.
Forget URLCustom password recovery URL.
Affiliation URLAffiliation or invitation URL.

OIDC/OAuth​

FieldDescription
Client IDOAuth 2.0 client identifier.
Client secretSegredo de cliente OAuth 2.0. Copy copia-o, Regenerate preenche um novo e pode manter o antigo funcionando por um tempo. Veja Rotacionar o segredo do cliente.
Previous client secretExibido enquanto o segredo substituído por Regenerate ainda é aceito, com o horário em que ele deixa de funcionar e Stop accepting it. Armazenado em previousClientSecret e previousClientSecretExpireTime.
Redirect URLsAllowed redirect URLs after sign-in. Casdoor checks them for the authorization code flow, the implicit flow, and the CAS service parameter. See Redirect URL matching.
Forced redirect originWhen set, Casdoor forces all redirects to this origin.
Grant typesEnabled OAuth grant types: Authorization Code, Password, Client Credentials, Token, ID Token, Refresh Token, Device Code, Token Exchange, JWT Bearer.
ScopesCustom scopes for Agent-category apps (name, display name, description); exposed in OIDC discovery.
Federated credentialsExternal OpenID Connect (OIDC) issuers whose tokens Casdoor accepts as a credential of this application, without a client secret. Each row has Issuer, JWKS URL, Subject, Audience, User, and Enable signup, which creates the mapped user on its first sign-in. See Federated credentials.
Token formatJWT, JWT-Empty, JWT-Custom, or JWT-Standard. A new application gets the Default token format of its organization. See Token overview.
Token signing methodSigning algorithm: RS256, RS512, ES256, ES384, or ES512.
Token group formatHow the groups claim of every token format and the groups of /api/userinfo name each group: ID (org/group) (the default), Path (org/parent/group), or Name (group). Path replaces the removed useGroupPathInToken setting of conf/app.conf.
Token fieldsUser fields included in the token payload (available when format is JWT-Custom). This list also acts as a whitelist for the /userinfo endpoint: when non-empty, only the listed fields are returned. Leave empty to include the full set. A new application gets the Default token fields of its organization. See Token overview.
Token attributesCustom claims added to the token (available when format is JWT-Custom). Each row has a Category, Value, and Type. See Token attributes
Token expireAccess token lifetime in hours.
Refresh token expireRefresh token lifetime in hours.

Atributos do token​

Cada linha de Token attributes adiciona uma claim personalizada ao token e tem uma Category, um Value e um Type:

CategoryValueResult
Static ValueA template string. It supports ${user.xxx} substitutionType sets whether the claim is a String or an Array
Existing FieldUm campo de usuário da lista: Owner, Name, Id, DisplayName, Avatar, Email, Phone, Tag, Roles, Permissions, permissionNames ou Groups. Referencie uma chave do mapa de propriedades como Properties.<key>O Casdoor lê o campo do usuário quando emite o token

Correspondência de URL de redirecionamento​

O Casdoor aceita uma URL de redirecionamento quando ela é igual a uma entrada de Redirect URLs, ou quando corresponde a uma entrada por estas regras:

EntryMatches
A full URL, such as https://example.com/callbackThe same scheme, port, and path. The host is the same host or a subdomain of it, so the entry also allows https://api.example.com/callback.
A loopback URL, such as http://localhost/callback or http://127.0.0.1/callbackThe same URL on any port, as RFC 8252 requires for native applications.
A host without a scheme, such as example.com or example.com/callbackhttp and https URLs on the host or its subdomains, with the path of the entry, or with any path if the entry has none. .example.com matches only the subdomains.
Anything elseThe entry is a regular expression that must match the whole URL.

O Casdoor sempre rejeita URLs javascript:, data: e vbscript:. URLs localhost, 127.0.0.1 e casdoor-authenticator precisam de uma entrada como qualquer outra URL.

SAML​

FieldDescription
SAML reply URLAssertion Consumer Service (ACS) URL where Casdoor posts the SAML response.
Enable SAML compressionCompress SAML requests and responses.
Enable SAML C14N10Use C14N 1.0 canonicalization when signing SAML documents.
SAML C14N prefixNamespace prefix list used for the C14N 1.0 canonicalization (applies when Enable SAML C14N10 is on; default xs).
Use Email as NameIDUse the user's email address as the SAML NameID instead of username.
Enable SAML POST bindingUse HTTP POST binding instead of Redirect binding.
SAML hash algorithmSignature hash algorithm: SHA1, SHA256, or SHA512.
Disable SAML attributesSend only NameID in the assertion, omit all other user attributes.
Enable SAML assertion signatureSign the assertion element in addition to the response envelope.
SAML attributesCustom attribute statements included in the SAML assertion (available when Disable SAML attributes is off).
SAML metadataRead-only XML metadata for this application; includes a button to copy the metadata URL.

Fornecedores​

FieldDescription
ProvidersProvedores OAuth, email, SMS, armazenamento e outros provedores anexados a esta aplicação. Controla quais métodos de login e integrações estão disponíveis.

Cada provedor OAuth e SAML na tabela Providers tem as seguintes configurações:

ColumnDescription
Can sign upAllow new users to register via this provider.
Can sign inAllow existing users to sign in via this provider.
Pode desvincularAllow users to unlink this provider from their account.
Regra de ligaçãoFields used to link a new external identity to an existing Casdoor user of the organization, checked in order: the first match links the accounts. Email matches only an email address that the provider reports as verified, and only a user whose email is verified or who didn't sign up through an application. Phone matches only a verified phone number, with its country code. Name matches the username, case-insensitively. The default is Email, Phone. An empty list turns linking off. If no rule links the identity and its email or phone already belongs to another user, Casdoor refuses the sign-up. A linked user completes their multi-factor authentication (MFA) before the sign-in finishes. See How Casdoor links accounts.
Country codesRestrict phone-based providers to specific country calling codes.
SolicitadoShow a prompt asking users to bind this provider after sign-up if they haven't already.
Grupo de cadastroOverride the application's Default group for users who sign up via this provider.

Personalização da interface​

FieldDescription
Org choice modeHow users select their organization at sign-in: None, Select (dropdown), or Input (text field).
Signin methodsOrdered list of sign-in methods shown on the sign-in page (e.g. Password, Verification code, WebAuthn).
Code signin groupsExibido quando Signin methods tem Verification code ou Magic link. Apenas os membros desses grupos podem fazer login com código ou link mágico. Vazio significa todos. Veja Limitar o login por código a grupos.
Signup HTMLCustom HTML injected into the sign-up page. See Custom HTML and scripts.
Signin HTMLCustom HTML injected into the sign-in page. See Custom HTML and scripts.
Page HTMLHTML personalizado injetado no <head> da página (por exemplo, meta tags, trechos de analytics ou estilos personalizados) para todas as páginas da aplicação. Um elemento <script>, como a maioria dos trechos de analytics usa, é executado apenas em aplicações da organização built-in e em aplicações com Enable custom scripts ativado. O Casdoor recusa scripts salvos por um administrador da organização. Para usar um script em outra organização, um administrador global ativa Enable custom scripts e insere o HTML. Veja HTML e scripts personalizados.
Signin itemsConfigure which fields and controls appear on the sign-in form.
Signup itemsConfigure the registration form fields (visible only when Enable signup is on).
Background URLDesktop sign-in page background image (URL + preview).
Background URL MobileMobile sign-in page background image (URL + preview).
Background URL DarkImagem de fundo da página de login no modo escuro.
More background URLsOutras imagens de fundo. Cada visita exibe uma delas ou Background URL, escolhida aleatoriamente.
Custom CSSCSS applied to the sign-in form (desktop).
Custom CSS MobileCSS applied to the sign-in form (mobile).
Form positionHorizontal alignment of the sign-in form: Left, Center, Right, or Enable side panel.
Side panel HTMLHTML shown in the panel beside the sign-in form (visible when Form position is set to Enable side panel).
ThemeUse o tema da organização ou defina um tema personalizado para esta aplicação: o estilo (Default, Dark, Document ou Blossom), a cor primária, o raio da borda e Is compact. Veja Personalizar o tema.
Enable custom scriptsRenderiza o HTML personalizado desta aplicação exatamente como está, para que os elementos <script> sejam executados. Apenas um administrador global pode ativar isso. Veja HTML e scripts personalizados.
Header HTMLCustom HTML injected into the page <head> of the sign-in and sign-up pages.
Footer HTMLCustom HTML rendered below the sign-in and sign-up forms. The footer of the Casdoor admin console shows the Footer HTML of the default application of the signed-in user's organization, in place of "Powered by Casdoor".

HTML e scripts personalizados​

Casdoor treats the custom HTML of an application differently depending on its organization and on Enable custom scripts:

  • Aplicações da organização built-in: o Casdoor renderiza o HTML como está, e elementos <script> são executados.
  • Applications of other organizations, unless Enable custom scripts is on: Casdoor removes scripts, event handlers, and other active content before it renders the HTML. Links that open in another window get rel="noopener noreferrer".

Um administrador global pode ativar Enable custom scripts para uma aplicação de qualquer organização. O Casdoor então renderiza o HTML personalizado daquela aplicação exatamente como está, assim como para built-in, e os elementos <script> são executados. Administradores da organização não podem ativar essa opção e, enquanto ela estiver ativada, não podem alterar o HTML personalizado da aplicação. Apenas um administrador global pode fazê-lo.

Isso se aplica a Header HTML, Page HTML, Footer HTML, Side panel HTML, Signin HTML, Signup HTML, itens de login personalizados e itens de cadastro Text. O rodapé do console de administração é sempre sanitizado, mesmo para built-in. O que os administradores da organização podem salvar nesses campos também é limitado. Veja O que os administradores da organização podem colocar em HTML e CSS personalizados.

Segurança​

FieldDescription
Token certCertificate used to sign tokens issued by this application.
Client certCertificate used to verify client identity. For mutual TLS it authenticates the client connection; for the JWT Bearer grant (RFC 7523), the public key in this certificate is used to verify the client's JWT assertion signature.
Failed signin limitNumber of consecutive failed sign-in attempts before the account is locked. This limit also applies to the /api/verify-code OTP endpoint: too many wrong verification codes will temporarily block that user+destination combination using the same counter and freeze time.
Failed signin frozen timeLock duration in minutes after hitting the failed sign-in limit.
Code resend timeoutSeconds a user must wait before requesting another verification code (default: 60; set to 0 for the global default).
IP whitelistComma-separated list of allowed IP addresses or CIDR ranges. Overrides the organization-level whitelist. See IP allowlist.
Terms of UseURL or path to the terms-of-use page (up to 200 characters). An HTML file can be uploaded directly and the resulting URL is filled in automatically.

Proxy reverso​

FieldDescription
DomainPrimary domain this application is served on (e.g. blog.example.com).
Other domainsAdditional domains that should route to this application.
Upstream hostO endereço do serviço de backend para o qual o Casdoor encaminha as solicitações (por exemplo, localhost:8080).
SSL modeTLS handling: None, HTTP, HTTPS and HTTP, or HTTPS Only.
SSL certCertificate used for HTTPS when acting as a reverse proxy.

Consulte também​