Class ProxyAuthServiceImpl
- java.lang.Object
-
- io.mosip.kernel.auth.defaultimpl.service.impl.ProxyAuthServiceImpl
-
- All Implemented Interfaces:
AuthNService,AuthService,AuthZService
@Profile("local") @Service public class ProxyAuthServiceImpl extends Object implements AuthServiceProxy Implementation of Auth service which will not use IAM just give back proxy token.- Author:
- Ramadurai Pandian, Urvil Joshi, Srinivasan
-
-
Constructor Summary
Constructors Constructor Description ProxyAuthServiceImpl()
-
Method Summary
-
-
-
Method Detail
-
validateToken
@Deprecated public MosipUserTokenDto validateToken(String token) throws Exception
Deprecated.Method used for validating Auth token- Specified by:
validateTokenin interfaceAuthZService- Parameters:
token- token- Returns:
- mosipUserDtoToken is of type
MosipUserTokenDto - Throws:
Exception- exception
-
authenticateUser
public AuthNResponseDto authenticateUser(LoginUser loginUser) throws Exception
Method used for Authenticating User based on username and password- Specified by:
authenticateUserin interfaceAuthNService- Parameters:
loginUser- is of typeLoginUser- Returns:
- authNResponseDto is of type
AuthNResponseDto - Throws:
Exception- exception
-
authenticateWithOtp
public AuthNResponseDto authenticateWithOtp(OtpUser otpUser) throws Exception
Method used for sending OTP- Specified by:
authenticateWithOtpin interfaceAuthNService- Parameters:
otpUser- is of typeOtpUser- Returns:
- authNResponseDto is of type
AuthNResponseDto - Throws:
Exception- exception
-
authenticateUserWithOtp
public AuthNResponseDto authenticateUserWithOtp(UserOtp userOtp) throws Exception
Method used for Authenticating User based with username and OTP- Specified by:
authenticateUserWithOtpin interfaceAuthNService- Parameters:
userOtp- is of typeUserOtp- Returns:
- authNResponseDto is of type
AuthNResponseDto - Throws:
Exception- exception
-
authenticateWithSecretKey
public AuthNResponseDto authenticateWithSecretKey(ClientSecret clientSecret) throws Exception
Method used for Authenticating User based with secretkey and password- Specified by:
authenticateWithSecretKeyin interfaceAuthNService- Parameters:
clientSecret- is of typeClientSecret- Returns:
- authNResponseDto is of type
AuthNResponseDto - Throws:
Exception- exception
-
refreshToken
public RefreshTokenResponse refreshToken(String appID, String refereshToken, RefreshTokenRequest refreshTokenRequest) throws Exception
Method used for generating refresh token- Specified by:
refreshTokenin interfaceAuthService- Parameters:
existingToken- existing token- Returns:
- mosipUserDtoToken is of type
MosipUserTokenDto - Throws:
Exception- exception
-
invalidateToken
public AuthNResponse invalidateToken(String token) throws Exception
Method used for invalidate token- Specified by:
invalidateTokenin interfaceAuthService- Parameters:
token- token- Returns:
- authNResponse is of type
AuthNResponse - Throws:
Exception- exception
-
getAllRoles
public RolesListDto getAllRoles(String appId)
- Specified by:
getAllRolesin interfaceAuthService
-
getListOfUsersDetails
public MosipUserListDto getListOfUsersDetails(List<String> userDetails, String appId) throws Exception
- Specified by:
getListOfUsersDetailsin interfaceAuthService- Throws:
Exception
-
getAllUserDetailsWithSalt
public MosipUserSaltListDto getAllUserDetailsWithSalt(List<String> userDetails, String appId) throws Exception
- Specified by:
getAllUserDetailsWithSaltin interfaceAuthService- Throws:
Exception
-
getRidBasedOnUid
public RIdDto getRidBasedOnUid(String userId, String appId) throws Exception
- Specified by:
getRidBasedOnUidin interfaceAuthService- Throws:
Exception
-
unBlockUser
public AuthZResponseDto unBlockUser(String userId, String appId) throws Exception
- Specified by:
unBlockUserin interfaceAuthService- Throws:
Exception
-
changePassword
public AuthZResponseDto changePassword(String appId, PasswordDto passwordDto) throws Exception
- Specified by:
changePasswordin interfaceAuthService- Throws:
Exception
-
resetPassword
public AuthZResponseDto resetPassword(String appId, PasswordDto passwordDto) throws Exception
- Specified by:
resetPasswordin interfaceAuthService- Throws:
Exception
-
getUserNameBasedOnMobileNumber
public UserNameDto getUserNameBasedOnMobileNumber(String appId, String mobileNumber) throws Exception
- Specified by:
getUserNameBasedOnMobileNumberin interfaceAuthService- Throws:
Exception
-
registerUser
public MosipUserDto registerUser(UserRegistrationRequestDto userCreationRequestDto)
- Specified by:
registerUserin interfaceAuthService
-
addUserPassword
public UserPasswordResponseDto addUserPassword(UserPasswordRequestDto userPasswordRequestDto)
- Specified by:
addUserPasswordin interfaceAuthService
-
getUserRole
public UserRoleDto getUserRole(String appId, String userId) throws Exception
- Specified by:
getUserRolein interfaceAuthService- Throws:
Exception
-
getUserDetailBasedonMobileNumber
public MosipUserDto getUserDetailBasedonMobileNumber(String appId, String mobileNumber) throws Exception
- Specified by:
getUserDetailBasedonMobileNumberin interfaceAuthService- Throws:
Exception
-
validateUserName
public ValidationResponseDto validateUserName(String appId, String userName)
- Specified by:
validateUserNamein interfaceAuthService
-
getUserDetailBasedOnUserId
public UserDetailsResponseDto getUserDetailBasedOnUserId(String appId, List<String> userIds)
- Specified by:
getUserDetailBasedOnUserIdin interfaceAuthService
-
valdiateToken
public MosipUserDto valdiateToken(String token)
- Specified by:
valdiateTokenin interfaceAuthService
-
logoutUser
public AuthResponseDto logoutUser(String token)
- Specified by:
logoutUserin interfaceAuthService
-
loginRedirect
public AccessTokenResponseDTO loginRedirect(String state, String sessionState, String code, String stateCookie, String redirectURI)
- Specified by:
loginRedirectin interfaceAuthService
-
getKeycloakURI
public String getKeycloakURI(String redirectURI, String state)
- Specified by:
getKeycloakURIin interfaceAuthService
-
-