Top Description Inners Methods
jakarta.security.enterprise.authentication.mechanism.http

public @Interface LoginToContinue

extends Annotation
Known Direct Implementers
jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.Literal
Annotations
@Inherited
@InterceptorBinding
@Retention:RUNTIME
@Target:TYPE
Static Imports
java.lang.annotation.ElementType.TYPE, .RetentionPolicy.RUNTIME

The LoginToContinue 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 type String 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 the FormAuthenticationMechanismDefinition or CustomFormAuthenticationMechanismDefinition, expressions using immediate syntax are evaluated only once when the HttpAuthenticationMechanism 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 the LoginToContinue annotation is used on a custom authentication mechanism.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LoginToContinue.Literal

Supports inline instantiation of the LoginToContinue annotation.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

page a caller is directed to after an authentication (login) error
errorPage
()

The resource (page) a caller should get to see in case an error, such as providing invalid credentials, occurs on the page set by LoginToContinue#loginPage().

public String

Returns:

page a caller is directed to to authenticate (login)
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.

public boolean

Returns:

true if a forward is to be used, false for a redirect
useForwardToLogin
()

Use a forward to reach the page set by the LoginToContinue#loginPage() if true, otherwise use a redirect.

public String

Returns:

an expression evaluating to true if a forward is to be used, false for a redirect
useForwardToLoginExpression
()

Jakarta Expression Language expression variant of useForwardToLogin().

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

errorPageback to summary
public 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 by LoginToContinue#loginPage().

Returns:String

page a caller is directed to after an authentication (login) error

Annotations
@Nonbinding
loginPageback to summary
public 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:String

page a caller is directed to to authenticate (login)

Annotations
@Nonbinding
useForwardToLoginback to summary
public boolean useForwardToLogin()

Use a forward to reach the page set by the LoginToContinue#loginPage() if true, otherwise use a redirect.

Returns:boolean

true if a forward is to be used, false for a redirect

Annotations
@Nonbinding
useForwardToLoginExpressionback to summary
public String useForwardToLoginExpression()

Jakarta Expression Language expression variant of useForwardToLogin(). The expression needs to evaluate to a boolean outcome. All named CDI beans are available to the expression. If both this attribute and useForwardToLogin() are specified, this attribute take precedence.

Returns:String

an expression evaluating to true if a forward is to be used, false for a redirect

Annotations
@Nonbinding
jakarta.security.enterprise.authentication.mechanism.http back to summary

public final Class LoginToContinue.Literal

extends AnnotationLiteral<LoginToContinue>
implements LoginToContinue
Class Inheritance
All Implemented Interfaces
jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue, java.lang.annotation.Annotation

Supports inline instantiation of the LoginToContinue annotation.
Since
3.0

Field Summary

Modifier and TypeField and Description
private final String
public static final LoginToContinue.Literal
INSTANCE

Default instance of the LoginToContinue Interceptor Binding.

private final String
private static final long
private final boolean
private final String

Constructor Summary

AccessConstructor and Description
private
Literal(String loginPage, boolean useForwardToLogin, String useForwardToLoginExpression, String errorPage)

Method Summary

Modifier and TypeMethod and Description
public String
errorPage()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.errorPage.

The resource (page) a caller should get to see in case an error, such as providing invalid credentials, occurs on the page set by LoginToContinue#loginPage().

public String
loginPage()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.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.

public static LoginToContinue.Literal

Returns:

instance of the LoginToContinue Interceptor Binding.
of
(String
page a caller is directed to to authenticate (login)
loginPage
,
boolean
true if a forward is to be used, false for a redirect
useForwardToLogin
,
String
an expression evaluating to true if a forward is to be used, false for a redirect
useForwardToLoginExpression
,
String
page a caller is directed to after an authentication (login) error
errorPage
)

Instance of the LoginToContinue Interceptor Binding.

public boolean
useForwardToLogin()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLogin.

Use a forward to reach the page set by the LoginToContinue#loginPage() if true, otherwise use a redirect.

public String
useForwardToLoginExpression()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLoginExpression.

Jakarta Expression Language expression variant of useForwardToLogin().

Inherited from jakarta.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

errorPageback to summary
private final String errorPage
INSTANCEback to summary
public static final LoginToContinue.Literal INSTANCE

Default instance of the LoginToContinue Interceptor Binding.

loginPageback to summary
private final String loginPage
serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.enterprise.util.AnnotationLiteral.serialVersionUID.

useForwardToLoginback to summary
private final boolean useForwardToLogin
useForwardToLoginExpressionback to summary
private final String useForwardToLoginExpression

Constructor Detail

Literalback to summary
private Literal(String loginPage, boolean useForwardToLogin, String useForwardToLoginExpression, String errorPage)

Method Detail

errorPageback to summary
public String errorPage()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.errorPage.

Doc from jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.errorPage.

The resource (page) a caller should get to see in case an error, such as providing invalid credentials, occurs on the page set by LoginToContinue#loginPage().

Returns:String

page a caller is directed to after an authentication (login) error

Annotations
@Override
loginPageback to summary
public String loginPage()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.loginPage.

Doc from jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.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:String

page a caller is directed to to authenticate (login)

Annotations
@Override
ofback to summary
public static LoginToContinue.Literal of(String loginPage, boolean useForwardToLogin, String useForwardToLoginExpression, String errorPage)

Instance of the LoginToContinue Interceptor Binding.

Parameters
loginPage:String

page a caller is directed to to authenticate (login)

useForwardToLogin:boolean

true if a forward is to be used, false for a redirect

useForwardToLoginExpression:String

an expression evaluating to true if a forward is to be used, false for a redirect

errorPage:String

page a caller is directed to after an authentication (login) error

Returns:LoginToContinue.Literal

instance of the LoginToContinue Interceptor Binding.

useForwardToLoginback to summary
public boolean useForwardToLogin()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLogin.

Doc from jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLogin.

Use a forward to reach the page set by the LoginToContinue#loginPage() if true, otherwise use a redirect.

Returns:boolean

true if a forward is to be used, false for a redirect

Annotations
@Override
useForwardToLoginExpressionback to summary
public String useForwardToLoginExpression()

Implements jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLoginExpression.

Doc from jakarta.security.enterprise.authentication.mechanism.http.LoginToContinue.useForwardToLoginExpression.

Jakarta Expression Language expression variant of useForwardToLogin(). The expression needs to evaluate to a boolean outcome. All named CDI beans are available to the expression. If both this attribute and useForwardToLogin() are specified, this attribute take precedence.

Returns:String

an expression evaluating to true if a forward is to be used, false for a redirect

Annotations
@Override