Class TuaAuthorizationCommonService
java.lang.Object
de.hybris.platform.tuawebservicesresources.security.TuaAuthorizationCommonService
Class defining common methods and fields to be used by other extensions regarding authentication.
- Since:
- 2302
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.AuthenticationRetrieves the authentication informationRetrieves the current user which is represented by relatedPartyId, if is not empty, or the user for which the authentication token was obtained
-
Constructor Details
-
TuaAuthorizationCommonService
public TuaAuthorizationCommonService()
-
-
Method Details
-
getAuthentication
public org.springframework.security.core.Authentication getAuthentication()Retrieves the authentication information- Returns:
- the authentication object for current spring context
-
getUser
public String getUser(org.springframework.security.core.Authentication authentication, String relatedPartyId) Retrieves the current user which is represented by relatedPartyId, if is not empty, or the user for which the authentication token was obtained- Parameters:
authentication- the authentication objectrelatedPartyId- the related party id- Returns:
- the id of current user null, if no user can be obtained
-