Class FormAuthenticationMechanism
java.lang.Object
io.quarkus.vertx.http.runtime.security.FormAuthenticationMechanism
- All Implemented Interfaces:
HttpAuthenticationMechanism
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
HttpAuthenticationMechanism.ChallengeSender -
Field Summary
FieldsFields inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
DEFAULT_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionFormAuthenticationMechanism(FormAuthConfig runtimeForm, Optional<String> encKey) FormAuthenticationMechanism(String loginPage, String postLocation, String usernameParameter, String passwordParameter, String errorPage, String landingPage, boolean redirectAfterLogin, String locationCookie, String cookieSameSite, String cookiePath, String cookieDomain, PersistentLoginManager loginManager) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) io.smallrye.mutiny.Uni<ChallengeData> getChallenge(io.vertx.ext.web.RoutingContext context) io.smallrye.mutiny.Uni<HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context) The credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed.If this mechanism delegates authentication to theIdentityProviderManagerusing theIdentityProviderManager.authenticate(AuthenticationRequest)call, then the mechanism must provide supportedAuthenticationRequestrequest types.(package private) String(package private) static io.smallrye.mutiny.Uni<ChallengeData> getRedirect(io.vertx.ext.web.RoutingContext exchange, String location, Set<String> redirectQueryParams) protected voidhandleRedirectBack(io.vertx.ext.web.RoutingContext exchange) static voidlogout(io.quarkus.security.identity.SecurityIdentity securityIdentity) static voidlogout(io.vertx.ext.web.RoutingContext routingContext) io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> runFormAuth(io.vertx.ext.web.RoutingContext exchange, io.quarkus.security.identity.IdentityProviderManager securityContext) (package private) static voidsendRedirect(io.vertx.ext.web.RoutingContext exchange, String location) protected voidDeprecated, for removal: This API element is subject to removal in a future version.this method hasn't been used by this class for some time now; if you implement this mechanism and have a use case with this method, please let us no so that we can document and test itprotected voidstoreInitialLocation(io.vertx.ext.web.RoutingContext exchange) protected voidverifyRedirectBackLocation(String requestURIString, String redirectUriString) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism
getPriority, sendChallenge
-
Field Details
-
encryptionKey
-
-
Constructor Details
-
FormAuthenticationMechanism
-
FormAuthenticationMechanism
@Deprecated(forRemoval=true, since="3.25") public FormAuthenticationMechanism(String loginPage, String postLocation, String usernameParameter, String passwordParameter, String errorPage, String landingPage, boolean redirectAfterLogin, String locationCookie, String cookieSameSite, String cookiePath, String cookieDomain, PersistentLoginManager loginManager) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
runFormAuth
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> runFormAuth(io.vertx.ext.web.RoutingContext exchange, io.quarkus.security.identity.IdentityProviderManager securityContext) -
handleRedirectBack
protected void handleRedirectBack(io.vertx.ext.web.RoutingContext exchange) -
verifyRedirectBackLocation
-
storeInitialLocation
protected void storeInitialLocation(io.vertx.ext.web.RoutingContext exchange) -
servePage
@Deprecated(since="3.31", forRemoval=true) protected void servePage(io.vertx.ext.web.RoutingContext exchange, String location) Deprecated, for removal: This API element is subject to removal in a future version.this method hasn't been used by this class for some time now; if you implement this mechanism and have a use case with this method, please let us no so that we can document and test it -
sendRedirect
-
getRedirect
static io.smallrye.mutiny.Uni<ChallengeData> getRedirect(io.vertx.ext.web.RoutingContext exchange, String location, Set<String> redirectQueryParams) -
authenticate
public io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> authenticate(io.vertx.ext.web.RoutingContext context, io.quarkus.security.identity.IdentityProviderManager identityProviderManager) - Specified by:
authenticatein interfaceHttpAuthenticationMechanism
-
getChallenge
- Specified by:
getChallengein interfaceHttpAuthenticationMechanism
-
getCredentialTypes
public Set<Class<? extends io.quarkus.security.identity.request.AuthenticationRequest>> getCredentialTypes()Description copied from interface:HttpAuthenticationMechanismIf this mechanism delegates authentication to theIdentityProviderManagerusing theIdentityProviderManager.authenticate(AuthenticationRequest)call, then the mechanism must provide supportedAuthenticationRequestrequest types. It allows Quarkus to validate that one or moreIdentityProviderproviders with matching supportedIdentityProvider.getRequestType()request types exist and fail otherwise.- Specified by:
getCredentialTypesin interfaceHttpAuthenticationMechanism- Returns:
- required credential types
-
getCredentialTransport
public io.smallrye.mutiny.Uni<HttpCredentialTransport> getCredentialTransport(io.vertx.ext.web.RoutingContext context) Description copied from interface:HttpAuthenticationMechanismThe credential transport, used for finding the best candidate for authenticating and challenging when more than one mechanism is installed.This method must be implemented if either
HttpAuthenticationMechanism.value()or an HTTP security policy's `auth-mechanism` property has to be set to find a matchingHttpAuthenticationMechanismthat must secure a specific REST resource method or request path.May be
Uniwith null item if this mechanism cannot interfere with other mechanisms.- Specified by:
getCredentialTransportin interfaceHttpAuthenticationMechanism
-
getPostLocation
String getPostLocation() -
logout
public static void logout(io.quarkus.security.identity.SecurityIdentity securityIdentity) -
logout
public static void logout(io.vertx.ext.web.RoutingContext routingContext)
-
FormAuthenticationMechanism(FormAuthConfig, Optional)