Package org.cyclos.impl.access
Class InternalIdentityProviderServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.access.InternalIdentityProviderServiceImpl
-
- All Implemented Interfaces:
InternalIdentityProviderServiceLocal,InternalIdentityProviderService,Service
@Service public class InternalIdentityProviderServiceImpl extends BaseServiceImpl implements InternalIdentityProviderServiceLocal
Implementation forInternalIdentityProviderService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
Fields inherited from interface org.cyclos.impl.access.InternalIdentityProviderServiceLocal
CHANNEL, PROFILE, REQUEST, REQUEST_DATA, SESSION_TOKEN
-
-
Constructor Summary
Constructors Constructor Description InternalIdentityProviderServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CallbackResultcallback(String requestId, RequestInfo requestInfo)Process the callback from an identity providervoidcheckExists(String requestId)Checks that a request with the given existsvoidfinishRegistration(User user, PublicRegistrationDTO dto)Performs the linking of the given user with the provider after finishing the registration process via form.org.pac4j.core.profile.CommonProfilegetRegistrationProfile(PublicRegistrationDTO dto)Returns the profile read from the identity providervoidinitialize()IdentityProviderNotLinkReasonlinkAfterLogin(Session session, String requestId)Links a user that just logged in to the identity provider.Stringredirect(String requestId, RequestInfo requestInfo)Computes the redirect URL for the given request idprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkIdentityProviderRequestResultrequest(@NotNull IdentityProviderRequest request)Prepares an operation using an identity provider.-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
callback
public CallbackResult callback(String requestId, RequestInfo requestInfo) throws FrameworkException
Description copied from interface:InternalIdentityProviderServiceProcess the callback from an identity provider- Specified by:
callbackin interfaceInternalIdentityProviderService- Throws:
FrameworkException
-
checkExists
public void checkExists(String requestId) throws EntityNotFoundException
Description copied from interface:InternalIdentityProviderServiceLocalChecks that a request with the given exists- Specified by:
checkExistsin interfaceInternalIdentityProviderServiceLocal- Throws:
EntityNotFoundException
-
finishRegistration
public void finishRegistration(User user, PublicRegistrationDTO dto)
Description copied from interface:InternalIdentityProviderServiceLocalPerforms the linking of the given user with the provider after finishing the registration process via form.- Specified by:
finishRegistrationin interfaceInternalIdentityProviderServiceLocal
-
getRegistrationProfile
public org.pac4j.core.profile.CommonProfile getRegistrationProfile(PublicRegistrationDTO dto)
Description copied from interface:InternalIdentityProviderServiceLocalReturns the profile read from the identity provider- Specified by:
getRegistrationProfilein interfaceInternalIdentityProviderServiceLocal
-
initialize
@PostConstruct public void initialize()
-
linkAfterLogin
public IdentityProviderNotLinkReason linkAfterLogin(Session session, String requestId)
Description copied from interface:InternalIdentityProviderServiceLocalLinks a user that just logged in to the identity provider. Returns the reason if the link was ignored (e.g for being a global user attempting to link with a network) provider. Otherwise if the link could be done then return null- Specified by:
linkAfterLoginin interfaceInternalIdentityProviderServiceLocal
-
redirect
public String redirect(String requestId, RequestInfo requestInfo)
Description copied from interface:InternalIdentityProviderServiceComputes the redirect URL for the given request id- Specified by:
redirectin interfaceInternalIdentityProviderService
-
request
public IdentityProviderRequestResult request(@NotNull @NotNull IdentityProviderRequest request)
Description copied from interface:InternalIdentityProviderServiceLocalPrepares an operation using an identity provider.- Specified by:
requestin interfaceInternalIdentityProviderServiceLocal
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
-