Package io.micronaut.security.config
Class DefaultRedirectService
java.lang.Object
io.micronaut.security.config.DefaultRedirectService
- All Implemented Interfaces:
RedirectService
@Requires(beans={io.micronaut.http.context.ServerContextPathProvider.class,SecurityConfiguration.class})
@Singleton
public class DefaultRedirectService
extends Object
implements RedirectService
Get redirection URLs combining context path and redirect configuration.
It prepends context path before redirect configuration URLs.
- Since:
- 3.7.2
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionDefaultRedirectService
(RedirectConfiguration redirectConfiguration, io.micronaut.http.context.ServerContextPathProvider serverContextPathProvider) -
Method Summary
-
Constructor Details
-
DefaultRedirectService
public DefaultRedirectService(RedirectConfiguration redirectConfiguration, io.micronaut.http.context.ServerContextPathProvider serverContextPathProvider) - Parameters:
serverContextPathProvider
- Server Context Path providerredirectConfiguration
- Redirect Configuration
-
-
Method Details
-
loginSuccessUrl
- Specified by:
loginSuccessUrl
in interfaceRedirectService
- Returns:
- String to be parsed into a URI which represents where the user is redirected to after a successful login.
-
loginFailureUrl
- Specified by:
loginFailureUrl
in interfaceRedirectService
- Returns:
- String to be parsed into a URI which represents where the user is redirected to after a failed login.
-
logoutUrl
- Specified by:
logoutUrl
in interfaceRedirectService
- Returns:
- String to be parsed into a URI which represents where the user is redirected to after logout.
-
unauthorizedUrl
- Specified by:
unauthorizedUrl
in interfaceRedirectService
- Returns:
- where the user is redirected to after trying to access a secured route.
-
forbiddenUrl
- Specified by:
forbiddenUrl
in interfaceRedirectService
- Returns:
- where the user is redirected to after trying to access a secured route for which the does not have sufficient roles.
-
refreshUrl
- Specified by:
refreshUrl
in interfaceRedirectService
- Returns:
- where the user is redirected to after executing the refresh token endpoint.
-