Views

The views are found inside the CAS web application in the WEB-INF\lib\cas-server-support-thymeleaf-<cas.version>.jar in the templates folder. Add any views that require customization to the src/main/resources/templates folder in the CAS overlay project. Any files found in that module can be overridden by putting them in the same location under src/main/resources in the CAS overlay project. The Gradle build script for the overlay has tasks that help get resources from the CAS web application to the correct location in the CAS overlay.

Templates

The following user interface templates are available and recognized by CAS for various modules and features:

Category Name Full Path Owner
acct-mgmt casAccountSignupView.html /src/main/resources/templates/acct-mgmt/casAccountSignupView.html Thymeleaf
acct-mgmt casAccountSignupViewComplete.html /src/main/resources/templates/acct-mgmt/casAccountSignupViewComplete.html Thymeleaf
acct-mgmt casAccountSignupViewCompleted.html /src/main/resources/templates/acct-mgmt/casAccountSignupViewCompleted.html Thymeleaf
acct-mgmt casAccountSignupViewSentInfo.html /src/main/resources/templates/acct-mgmt/casAccountSignupViewSentInfo.html Thymeleaf
acct casMyAccountProfile.html /src/main/resources/templates/acct/casMyAccountProfile.html Thymeleaf
adaptive-authn casRiskAuthenticationBlockedView.html /src/main/resources/templates/adaptive-authn/casRiskAuthenticationBlockedView.html Thymeleaf
adaptive-authn casRiskAuthenticationVerifiedView.html /src/main/resources/templates/adaptive-authn/casRiskAuthenticationVerifiedView.html Thymeleaf
admin casAdminLoginView.html /src/main/resources/templates/admin/casAdminLoginView.html Thymeleaf
aup casAcceptableUsagePolicyView.html /src/main/resources/templates/aup/casAcceptableUsagePolicyView.html Thymeleaf
consent casConsentView.html /src/main/resources/templates/consent/casConsentView.html Thymeleaf
delegated-authn casDelegatedAuthnErrorView.html /src/main/resources/templates/delegated-authn/casDelegatedAuthnErrorView.html Thymeleaf
delegated-authn casDelegatedAuthnSelectionView.html /src/main/resources/templates/delegated-authn/casDelegatedAuthnSelectionView.html Thymeleaf
delegated-authn casDelegatedAuthnStopWebflow.html /src/main/resources/templates/delegated-authn/casDelegatedAuthnStopWebflow.html Thymeleaf
delegated-authn casDynamicDiscoveryView.html /src/main/resources/templates/delegated-authn/casDynamicDiscoveryView.html Thymeleaf
error error.html /src/main/resources/templates/error.html Thymeleaf
error 400.html /src/main/resources/templates/error/400.html Thymeleaf
error 401.html /src/main/resources/templates/error/401.html Thymeleaf
error 403.html /src/main/resources/templates/error/403.html Thymeleaf
error 404.html /src/main/resources/templates/error/404.html Thymeleaf
error 405.html /src/main/resources/templates/error/405.html Thymeleaf
error 422.html /src/main/resources/templates/error/422.html Thymeleaf
error 423.html /src/main/resources/templates/error/423.html Thymeleaf
error casServiceErrorView.html /src/main/resources/templates/error/casServiceErrorView.html Thymeleaf
error casUnauthorizedServiceRedirectView.html /src/main/resources/templates/error/casUnauthorizedServiceRedirectView.html Thymeleaf
error casWebflowConfigErrorView.html /src/main/resources/templates/error/casWebflowConfigErrorView.html Thymeleaf
forgot-username casForgotUsernameSendInfoView.html /src/main/resources/templates/forgot-username/casForgotUsernameSendInfoView.html Thymeleaf
forgot-username casForgotUsernameSentInfoView.html /src/main/resources/templates/forgot-username/casForgotUsernameSentInfoView.html Thymeleaf
fragments accountprofileaccesstokens.html /src/main/resources/templates/fragments/accountprofileaccesstokens.html Thymeleaf
fragments accountprofileapplications.html /src/main/resources/templates/fragments/accountprofileapplications.html Thymeleaf
fragments accountprofileattributes.html /src/main/resources/templates/fragments/accountprofileattributes.html Thymeleaf
fragments accountprofileauditlog.html /src/main/resources/templates/fragments/accountprofileauditlog.html Thymeleaf
fragments accountprofileconsent.html /src/main/resources/templates/fragments/accountprofileconsent.html Thymeleaf
fragments accountprofilemfadevices.html /src/main/resources/templates/fragments/accountprofilemfadevices.html Thymeleaf
fragments accountprofilenavigation.html /src/main/resources/templates/fragments/accountprofilenavigation.html Thymeleaf
fragments accountprofileoverview.html /src/main/resources/templates/fragments/accountprofileoverview.html Thymeleaf
fragments accountprofilesecurityquestions.html /src/main/resources/templates/fragments/accountprofilesecurityquestions.html Thymeleaf
fragments accountprofilesessions.html /src/main/resources/templates/fragments/accountprofilesessions.html Thymeleaf
fragments accountprofiletrusteddevices.html /src/main/resources/templates/fragments/accountprofiletrusteddevices.html Thymeleaf
fragments footer.html /src/main/resources/templates/fragments/footer.html Thymeleaf
fragments googleanalytics.html /src/main/resources/templates/fragments/googleanalytics.html Thymeleaf
fragments header.html /src/main/resources/templates/fragments/header.html Thymeleaf
fragments includes.html /src/main/resources/templates/fragments/includes.html Thymeleaf
fragments loginProviders.html /src/main/resources/templates/fragments/loginProviders.html Thymeleaf
fragments logindrawer.html /src/main/resources/templates/fragments/logindrawer.html Thymeleaf
fragments loginform.html /src/main/resources/templates/fragments/loginform.html Thymeleaf
fragments loginsidebar.html /src/main/resources/templates/fragments/loginsidebar.html Thymeleaf
fragments pmlinks.html /src/main/resources/templates/fragments/pmlinks.html Thymeleaf
fragments pwdupdateform.html /src/main/resources/templates/fragments/pwdupdateform.html Thymeleaf
fragments qrAuthentication.html /src/main/resources/templates/fragments/qrAuthentication.html Thymeleaf
fragments recaptcha.html /src/main/resources/templates/fragments/recaptcha.html Thymeleaf
fragments scripts.html /src/main/resources/templates/fragments/scripts.html Thymeleaf
fragments serviceui.html /src/main/resources/templates/fragments/serviceui.html Thymeleaf
fragments submitbutton.html /src/main/resources/templates/fragments/submitbutton.html Thymeleaf
fragments switchbutton.html /src/main/resources/templates/fragments/switchbutton.html Thymeleaf
fragments unlockaccount.html /src/main/resources/templates/fragments/unlockaccount.html Thymeleaf
fragments webAuthnLogin.html /src/main/resources/templates/fragments/webAuthnLogin.html Thymeleaf
gauth casGoogleAuthenticatorConfirmRegistrationView.html /src/main/resources/templates/gauth/casGoogleAuthenticatorConfirmRegistrationView.html Thymeleaf
gauth casGoogleAuthenticatorLoginView.html /src/main/resources/templates/gauth/casGoogleAuthenticatorLoginView.html Thymeleaf
gauth casGoogleAuthenticatorRegistrationView.html /src/main/resources/templates/gauth/casGoogleAuthenticatorRegistrationView.html Thymeleaf
gua casGuaDisplayUserGraphicsView.html /src/main/resources/templates/gua/casGuaDisplayUserGraphicsView.html Thymeleaf
gua casGuaGetUserIdView.html /src/main/resources/templates/gua/casGuaGetUserIdView.html Thymeleaf
interrupt casInterruptView.html /src/main/resources/templates/interrupt/casInterruptView.html Thymeleaf
inwebo casInweboCheckResultView.html /src/main/resources/templates/inwebo/casInweboCheckResultView.html Thymeleaf
inwebo casInweboErrorView.html /src/main/resources/templates/inwebo/casInweboErrorView.html Thymeleaf
inwebo casInweboMAAuthnView.html /src/main/resources/templates/inwebo/casInweboMAAuthnView.html Thymeleaf
inwebo casInweboSelectAuthnView.html /src/main/resources/templates/inwebo/casInweboSelectAuthnView.html Thymeleaf
inwebo casInweboVAAuthnView.html /src/main/resources/templates/inwebo/casInweboVAAuthnView.html Thymeleaf
layout layout.html /src/main/resources/templates/layout.html Thymeleaf
login-error casAccountDisabledView.html /src/main/resources/templates/login-error/casAccountDisabledView.html Thymeleaf
login-error casAccountLockedView.html /src/main/resources/templates/login-error/casAccountLockedView.html Thymeleaf
login-error casAccountUnlockedView.html /src/main/resources/templates/login-error/casAccountUnlockedView.html Thymeleaf
login-error casAuthenticationBlockedView.html /src/main/resources/templates/login-error/casAuthenticationBlockedView.html Thymeleaf
login-error casBadHoursView.html /src/main/resources/templates/login-error/casBadHoursView.html Thymeleaf
login-error casBadWorkstationView.html /src/main/resources/templates/login-error/casBadWorkstationView.html Thymeleaf
login-error casExpiredPassView.html /src/main/resources/templates/login-error/casExpiredPassView.html Thymeleaf
login-error casMustChangePassView.html /src/main/resources/templates/login-error/casMustChangePassView.html Thymeleaf
login casConfirmView.html /src/main/resources/templates/login/casConfirmView.html Thymeleaf
login casGenericSuccessView.html /src/main/resources/templates/login/casGenericSuccessView.html Thymeleaf
login casLoginMessageView.html /src/main/resources/templates/login/casLoginMessageView.html Thymeleaf
login casLoginView.html /src/main/resources/templates/login/casLoginView.html Thymeleaf
logout casConfirmLogoutView.html /src/main/resources/templates/logout/casConfirmLogoutView.html Thymeleaf
logout casLogoutView.html /src/main/resources/templates/logout/casLogoutView.html Thymeleaf
logout casPropagateLogoutView.html /src/main/resources/templates/logout/casPropagateLogoutView.html Thymeleaf
mfa-trusted-devices casMfaRegisterDeviceView.html /src/main/resources/templates/mfa-trusted-devices/casMfaRegisterDeviceView.html Thymeleaf
mfa casCompositeMfaProviderSelectionView.html /src/main/resources/templates/mfa/casCompositeMfaProviderSelectionView.html Thymeleaf
mfa casMfaDeniedView.html /src/main/resources/templates/mfa/casMfaDeniedView.html Thymeleaf
mfa casMfaUnavailableView.html /src/main/resources/templates/mfa/casMfaUnavailableView.html Thymeleaf
password-reset casPasswordUpdateSuccessView.html /src/main/resources/templates/password-reset/casPasswordUpdateSuccessView.html Thymeleaf
password-reset casResetPasswordErrorView.html /src/main/resources/templates/password-reset/casResetPasswordErrorView.html Thymeleaf
password-reset casResetPasswordSendInstructionsView.html /src/main/resources/templates/password-reset/casResetPasswordSendInstructionsView.html Thymeleaf
password-reset casResetPasswordSentInstructionsView.html /src/main/resources/templates/password-reset/casResetPasswordSentInstructionsView.html Thymeleaf
password-reset casResetPasswordVerifyQuestionsView.html /src/main/resources/templates/password-reset/casResetPasswordVerifyQuestionsView.html Thymeleaf
password-reset casWeakPasswordDetectedView.html /src/main/resources/templates/password-reset/casWeakPasswordDetectedView.html Thymeleaf
passwordless casPasswordlessDisplayView.html /src/main/resources/templates/passwordless/casPasswordlessDisplayView.html Thymeleaf
passwordless casPasswordlessGetUserIdView.html /src/main/resources/templates/passwordless/casPasswordlessGetUserIdView.html Thymeleaf
protocol casProxyFailureView.mustache /src/main/resources/templates/protocol/2.0/casProxyFailureView.mustache Mustache
protocol casProxySuccessView.mustache /src/main/resources/templates/protocol/2.0/casProxySuccessView.mustache Mustache
protocol casServiceValidationFailure.mustache /src/main/resources/templates/protocol/2.0/casServiceValidationFailure.mustache Mustache
protocol casServiceValidationSuccess.mustache /src/main/resources/templates/protocol/2.0/casServiceValidationSuccess.mustache Mustache
protocol casServiceValidationFailure.mustache /src/main/resources/templates/protocol/3.0/casServiceValidationFailure.mustache Mustache
protocol casServiceValidationSuccess.mustache /src/main/resources/templates/protocol/3.0/casServiceValidationSuccess.mustache Mustache
protocol casPostResponseView.html /src/main/resources/templates/protocol/casPostResponseView.html Thymeleaf
protocol confirm.html /src/main/resources/templates/protocol/oauth/confirm.html Thymeleaf
protocol deviceCodeApproval.html /src/main/resources/templates/protocol/oauth/deviceCodeApproval.html Thymeleaf
protocol deviceCodeApproved.html /src/main/resources/templates/protocol/oauth/deviceCodeApproved.html Thymeleaf
protocol sessionStaleMismatchError.html /src/main/resources/templates/protocol/oauth/sessionStaleMismatchError.html Thymeleaf
protocol cibaVerification.html /src/main/resources/templates/protocol/oidc/cibaVerification.html Thymeleaf
protocol confirm.html /src/main/resources/templates/protocol/oidc/confirm.html Thymeleaf
radius casRadiusLoginView.html /src/main/resources/templates/radius/casRadiusLoginView.html Thymeleaf
saml2-discovery casSamlIdPDiscoveryView.html /src/main/resources/templates/saml2-discovery/casSamlIdPDiscoveryView.html Thymeleaf
saml2-idp casSamlIdPErrorView.html /src/main/resources/templates/saml2-idp/casSamlIdPErrorView.html Thymeleaf
simple-mfa casSimpleMfaLoginView.html /src/main/resources/templates/simple-mfa/casSimpleMfaLoginView.html Thymeleaf
simple-mfa casSimpleMfaSelectEmailsView.html /src/main/resources/templates/simple-mfa/casSimpleMfaSelectEmailsView.html Thymeleaf
storage casBrowserStorageReadView.html /src/main/resources/templates/storage/casBrowserStorageReadView.html Thymeleaf
storage casBrowserStorageWriteView.html /src/main/resources/templates/storage/casBrowserStorageWriteView.html Thymeleaf
surrogate casSurrogateAuthnListView.html /src/main/resources/templates/surrogate/casSurrogateAuthnListView.html Thymeleaf
surrogate casSurrogateAuthnWildcardView.html /src/main/resources/templates/surrogate/casSurrogateAuthnWildcardView.html Thymeleaf
webauthn casWebAuthnLoginView.html /src/main/resources/templates/webauthn/casWebAuthnLoginView.html Thymeleaf
webauthn casWebAuthnRegistrationView.html /src/main/resources/templates/webauthn/casWebAuthnRegistrationView.html Thymeleaf
wsfed casWsFedStopWebflow.html /src/main/resources/templates/wsfed/casWsFedStopWebflow.html Thymeleaf
yubikey casYubiKeyLoginView.html /src/main/resources/templates/yubikey/casYubiKeyLoginView.html Thymeleaf
yubikey casYubiKeyRegistrationView.html /src/main/resources/templates/yubikey/casYubiKeyRegistrationView.html Thymeleaf

Configuration

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting may be needed to activate or affect the behavior of the CAS feature and generally should be reviewed, possibly owned and adjusted. If the setting is assigned a default value, you do not need to strictly put the setting in your copy of the configuration, but should review it nonetheless to make sure it matches your deployment expectations.

The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value. In other words, you should only include this field in your configuration if you need to modify the default value or if you need to turn on the feature controlled by the setting.

  • cas.view.template-prefixes=
  • Comma separated paths to where CAS templates may be found. Example might be classpath:templates,file:/templates.

    org.apereo.cas.configuration.model.core.web.view.ViewProperties.

    How can I configure this property?

    Configuration Metadata

    The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.

    Be Selective

    This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.

    YAGNI

    Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.

    Naming Convention

    Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc.

    :information_source: Note

    When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value. The only possible exception to this rule is when naming actuator endpoints; The name of the actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.

    Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.

    Validation

    Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.

    Indexed Settings

    CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.

    Warning Before Accessing Application

    CAS has the ability to warn the user before being redirected to the service. This allows users to be made aware whenever an application uses CAS to log them in. (If they don’t elect the warning, they may not see any CAS screen when accessing an application that successfully relies upon an existing CAS single sign-on session.) Some CAS adopters remove the ‘warn’ checkbox in the CAS login view and don’t offer this interstitial advisement that single sign-on is happening.

    1
    2
    3
    4
    5
    6
    7
    8
    
    ...
    <input id="warn"
       name="warn"
       value="true"
       th:accesskey="#{screen.welcome.label.warn.accesskey}"
       type="checkbox" />
    <label for="warn" th:utext="#{screen.welcome.label.warn}"/>
    ...