Package org.craftercms.security.social
Interface ProviderLoginSupport
- All Known Implementing Classes:
ProviderLoginSupportImpl
public interface ProviderLoginSupport
Helper class that allows for executing logins with a social service provider like Facebook, Twitter, LinkedIn, etc.
- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptionCompletes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.complete
(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes) Completes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.complete
(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes, org.springframework.social.connect.web.ConnectSupport connectSupport) Completes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.Starts the OAuth login process.start
(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String, String> additionalUrlParams) Starts the OAuth login process.start
(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String, String> additionalUrlParams, org.springframework.social.connect.web.ConnectSupport connectSupport) Starts the OAuth login process.
-
Method Details
-
start
String start(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request) throws AuthenticationException Starts the OAuth login process. Returns a URL that the app should redirect to.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current request- Returns:
- the provider specific URL the current app should redirect too.
- Throws:
AuthenticationException
-
start
String start(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String, String> additionalUrlParams) throws AuthenticationExceptionStarts the OAuth login process. Returns a URL that the app should redirect to.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current requestadditionalUrlParams
- additional parameters that should be added to the redirect URL- Returns:
- the provider specific URL the current app should redirect too.
- Throws:
AuthenticationException
-
start
String start(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String, String> additionalUrlParams, org.springframework.social.connect.web.ConnectSupport connectSupport) throws AuthenticationExceptionStarts the OAuth login process. Returns a URL that the app should redirect to.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current requestadditionalUrlParams
- additional parameters that should be added to the redirect URLconnectSupport
- helper class instance for establishing the connections with the providers- Returns:
- the provider specific URL the current app should redirect too.
- Throws:
AuthenticationException
-
complete
Authentication complete(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request) throws AuthenticationException Completes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current request- Returns:
- the authentication
- Throws:
AuthenticationException
-
complete
Authentication complete(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes) throws AuthenticationExceptionCompletes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current requestnewUserRoles
- roles to add to a new usernewUserAttributes
- attributes to add to a new user- Returns:
- the authentication
- Throws:
AuthenticationException
-
complete
Authentication complete(String tenant, String providerId, jakarta.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes, org.springframework.social.connect.web.ConnectSupport connectSupport) throws AuthenticationExceptionCompletes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.- Parameters:
tenant
- the current tenant the authenticated user belongs tooproviderId
- the social service provider ID: facebook, twitter, linkedinrequest
- the current requestnewUserRoles
- roles to add to a new usernewUserAttributes
- attributes to add to a new userconnectSupport
- helper class instance for establishing the connections with the providers- Returns:
- the authentication
- Throws:
AuthenticationException
-