Package ch.tocco.nice2.sso.impl
Class OpenIdRegistrationServiceImpl
java.lang.Object
ch.tocco.nice2.sso.impl.OpenIdRegistrationServiceImpl
- All Implemented Interfaces:
OpenIdRegistrationService
@Component
public class OpenIdRegistrationServiceImpl
extends Object
implements OpenIdRegistrationService
-
Constructor Summary
ConstructorDescriptionOpenIdRegistrationServiceImpl
(Context context, SecurityManager securityManager, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, L10N l10n, EmailTemplateLoadService emailTemplateLoadService, MailFactory mailFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetMatchingPrincipal
(@Nullable String emailAddress) Searchs for a matching principal using a given emailAddress 1.registerOpenIdUser
(Entity provider, Entity principal, String subject, String sourceUri) Saves the registration data to a "Openid_link_information" entity and returns the generated uuid.void
sendRegistrationMail
(Entity principal, String uuid) Sends the registration mail (email template "sso_registration_mail")
-
Constructor Details
-
OpenIdRegistrationServiceImpl
public OpenIdRegistrationServiceImpl(Context context, SecurityManager securityManager, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService, L10N l10n, EmailTemplateLoadService emailTemplateLoadService, MailFactory mailFactory)
-
-
Method Details
-
getMatchingPrincipal
Description copied from interface:OpenIdRegistrationService
Searchs for a matching principal using a given emailAddress 1. Checks if there is a principal with the emailAddress as 'username' if so, return this Principal 2. Checks if there exactly one Principal that is linked with a user using the given emailAddress. If so, return it.- Specified by:
getMatchingPrincipal
in interfaceOpenIdRegistrationService
- Returns:
- identified principal or absent if we were not able to find a unique match
-
registerOpenIdUser
public String registerOpenIdUser(Entity provider, Entity principal, String subject, String sourceUri) Description copied from interface:OpenIdRegistrationService
Saves the registration data to a "Openid_link_information" entity and returns the generated uuid.- Specified by:
registerOpenIdUser
in interfaceOpenIdRegistrationService
- Returns:
- the generated uuid
-
sendRegistrationMail
Description copied from interface:OpenIdRegistrationService
Sends the registration mail (email template "sso_registration_mail")- Specified by:
sendRegistrationMail
in interfaceOpenIdRegistrationService
-