Class DefaultClientRedirectService
- java.lang.Object
-
- com.broadleafcommerce.auth.server.service.DefaultClientRedirectService
-
- All Implemented Interfaces:
ClientRedirectService
public class DefaultClientRedirectService extends Object implements ClientRedirectService
-
-
Constructor Summary
Constructors Constructor Description DefaultClientRedirectService(AuthorizedClientService<AuthorizedClient> clientService, AuthorizationServerService<AuthorizationServer> serverService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRedirectToUrl(String redirectUrl, String clientId)
Checks if the user is able to be redirected to the given redirect URLprotected AuthorizedClientService<AuthorizedClient>
getClientService()
String
getDefaultRedirectUrlForClientId(String clientId)
Used for returning the default redirect URL for the provided clientprotected AuthorizationServerService<AuthorizationServer>
getServerService()
-
-
-
Constructor Detail
-
DefaultClientRedirectService
public DefaultClientRedirectService(AuthorizedClientService<AuthorizedClient> clientService, AuthorizationServerService<AuthorizationServer> serverService)
-
-
Method Detail
-
getDefaultRedirectUrlForClientId
public String getDefaultRedirectUrlForClientId(String clientId)
Description copied from interface:ClientRedirectService
Used for returning the default redirect URL for the provided client- Specified by:
getDefaultRedirectUrlForClientId
in interfaceClientRedirectService
- Parameters:
clientId
- The String id of the client to resolve the redirect URL for- Returns:
- The default redirect URL for the given client, if exists, or null
-
canRedirectToUrl
public boolean canRedirectToUrl(String redirectUrl, String clientId)
Description copied from interface:ClientRedirectService
Checks if the user is able to be redirected to the given redirect URL- Specified by:
canRedirectToUrl
in interfaceClientRedirectService
- Parameters:
redirectUrl
- The URL to check againstclientId
- The id of theAuthorizedClient
to use for validating the URL- Returns:
- True if the user can be redirected to redirectUrl, else false
-
getClientService
protected AuthorizedClientService<AuthorizedClient> getClientService()
-
getServerService
protected AuthorizationServerService<AuthorizationServer> getServerService()
-
-