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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Authentication
complete(String tenant, String providerId, javax.servlet.http.HttpServletRequest request)
Completes the OAuth authentication, returning the resultingAuthentication
object, or null if it couldn't be completed.Authentication
complete(String tenant, String providerId, javax.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.Authentication
complete(String tenant, String providerId, javax.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.String
start(String tenant, String providerId, javax.servlet.http.HttpServletRequest request)
Starts the OAuth login process.String
start(String tenant, String providerId, javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String,String> additionalUrlParams)
Starts the OAuth login process.String
start(String tenant, String providerId, javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String,String> additionalUrlParams, org.springframework.social.connect.web.ConnectSupport connectSupport)
Starts the OAuth login process.
-
-
-
Method Detail
-
start
String start(String tenant, String providerId, javax.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, javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String,String> additionalUrlParams) 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 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, javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<String,String> additionalUrlParams, org.springframework.social.connect.web.ConnectSupport connectSupport) 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 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, javax.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, javax.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String,Object> newUserAttributes) 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 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, javax.servlet.http.HttpServletRequest request, Set<String> newUserRoles, Map<String,Object> newUserAttributes, org.springframework.social.connect.web.ConnectSupport connectSupport) 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 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
-
-