Annotation Type LoginToContinue
-
@Inherited @InterceptorBinding @Retention(RUNTIME) @Target(TYPE) public @interface LoginToContinue
TheLoginToContinue
annotation provides an application the ability to declaratively add login to continue functionality to an authentication mechanism.When the
LoginToContinue
annotation is used on a custom authentication mechanism, Expression Language expressions in attributes of typeString
are evaluated for every request requiring authentication. Both immediate and deferred syntax is supported, but effectively the semantics are always deferred.When the
LoginToContinue
annotation is used as attribute in either theFormAuthenticationMechanismDefinition
orCustomFormAuthenticationMechanismDefinition
, expressions using immediate syntax are evaluated only once when theHttpAuthenticationMechanism
bean is created. Since these beans are application scoped, this means only once per application. Expressions using deferred syntax are evaluated as described above when theLoginToContinue
annotation is used on a custom authentication mechanism.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
errorPage
The resource (page) a caller should get to see in case an error, such as providing invalid credentials, occurs on the page set byloginPage()
.String
loginPage
The resource (page) a caller should get to see in case the originally requested resource requires authentication, and the caller is currently not authenticated.boolean
useForwardToLogin
Use a forward to reach the page set by theloginPage()
if true, otherwise use a redirect.String
useForwardToLoginExpression
Jakarta Expression Language expression variant ofuseForwardToLogin()
.
-
-
-
Element Detail
-
loginPage
String loginPage
The resource (page) a caller should get to see in case the originally requested resource requires authentication, and the caller is currently not authenticated.- Returns:
- page a caller is directed to to authenticate (login)
- Default:
- "/login"
-
-
-
useForwardToLogin
boolean useForwardToLogin
Use a forward to reach the page set by theloginPage()
if true, otherwise use a redirect.- Returns:
- true if a forward is to be used, false for a redirect
- Default:
- true
-
-
-
useForwardToLoginExpression
String useForwardToLoginExpression
Jakarta Expression Language expression variant ofuseForwardToLogin()
. The expression needs to evaluate to a boolean outcome. All named CDI beans are available to the expression. If both this attribute anduseForwardToLogin()
are specified, this attribute take precedence.- Returns:
- an expression evaluating to true if a forward is to be used, false for a redirect
- Default:
- ""
-
-
-
errorPage
String errorPage
The resource (page) a caller should get to see in case an error, such as providing invalid credentials, occurs on the page set byloginPage()
.- Returns:
- page a caller is directed to after an authentication (login) error
- Default:
- "/login-error"
-
-