Interface WebAuthenticationPlugin<T>
- All Superinterfaces:
io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin
- All Known Implementing Classes:
AzureAdWebAuthenticationPlugin,LocalWebAuthenticationPlugin,OIDCWebAuthenticationPlugin,SAML2WebAuthenticationPlugin
public interface WebAuthenticationPlugin<T>
extends io.vertigo.core.node.component.Plugin
-
Method Summary
Modifier and TypeMethodDescriptiondoHandleCallback(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) Handle the callback request after login on the ssodefault io.vertigo.core.lang.Tuple<AuthenticationResult<T>,jakarta.servlet.http.HttpServletRequest> doInterceptRequest(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) booleandoLogout(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) voiddoRedirectToSso(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the redirect to the sso login pageReturns the url for callbackReturn an optional external url of the application (if it is behind a firewall or a proxy)Returns the url for logoutgetRequestedUri(jakarta.servlet.http.HttpServletRequest httpRequest) Return the original request a user wanted before beeing redirected to the ssoUrl prefix of request directly handled by the pluginMap<String,BiFunction<jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, io.vertigo.core.lang.Tuple<Boolean, jakarta.servlet.http.HttpServletRequest>>> Register additionnal handler for specific request necessary for the pluginUrl prefix of urls that are protected with this authentication plugin
-
Method Details
-
getCallbackUrl
String getCallbackUrl()Returns the url for callback- Returns:
- url for callback
-
getLogoutUrl
String getLogoutUrl()Returns the url for logout- Returns:
- url for logout
-
doRedirectToSso
void doRedirectToSso(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the redirect to the sso login page- Parameters:
request- the requestresponse- the response to consume
-
doHandleCallback
AuthenticationResult<T> doHandleCallback(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) Handle the callback request after login on the sso- Parameters:
httpRequest- the requesthttpResponse- the response to consume- Returns:
- result of login challenge, providing info of the logged in user
-
getUrlHandlers
Map<String,BiFunction<jakarta.servlet.http.HttpServletRequest, getUrlHandlers()jakarta.servlet.http.HttpServletResponse, io.vertigo.core.lang.Tuple<Boolean, jakarta.servlet.http.HttpServletRequest>>> Register additionnal handler for specific request necessary for the plugin- Returns:
- le map of specific handlers
-
getUrlPrefix
String getUrlPrefix()Url prefix of urls that are protected with this authentication plugin- Returns:
- the prefix
-
getUrlHandlerPrefix
String getUrlHandlerPrefix()Url prefix of request directly handled by the plugin- Returns:
- the prefix
-
getRequestedUri
Return the original request a user wanted before beeing redirected to the sso- Parameters:
httpRequest- the request- Returns:
- the uri
-
getExternalUrlOptional
Return an optional external url of the application (if it is behind a firewall or a proxy)- Returns:
- the external url of the app : as seen by the end user
-
doInterceptRequest
default io.vertigo.core.lang.Tuple<AuthenticationResult<T>,jakarta.servlet.http.HttpServletRequest> doInterceptRequest(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) -
doLogout
boolean doLogout(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)
-