Class AuthServiceImpl
java.lang.Object
io.mosip.kernel.auth.defaultimpl.service.impl.AuthServiceImpl
- All Implemented Interfaces:
AuthNService,AuthService,AuthZService
Auth Service for Authentication and Authorization
- Author:
- Ramadurai Pandian, Urvil Joshi, Srinivasan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.mosip.kernel.core.authmanager.model.AuthNResponseDtoauthenticateUser(io.mosip.kernel.core.authmanager.model.LoginUser loginUser) Method used for Authenticating User based on username and passwordio.mosip.kernel.core.authmanager.model.AuthNResponseDtoauthenticateUser(io.mosip.kernel.core.authmanager.model.LoginUserWithClientId loginUser) io.mosip.kernel.core.authmanager.model.AuthNResponseDtoauthenticateUserWithOtp(io.mosip.kernel.core.authmanager.model.UserOtp userOtp) Method used for Authenticating User based with username and OTPio.mosip.kernel.core.authmanager.model.AuthNResponseDtoauthenticateWithOtp(io.mosip.kernel.core.authmanager.model.OtpUser otpUser) Method used for sending OTPio.mosip.kernel.core.authmanager.model.AuthNResponseDtoauthenticateWithSecretKey(io.mosip.kernel.core.authmanager.model.ClientSecret clientSecret) Method used for Authenticating User based with secretkey and passwordio.mosip.kernel.core.authmanager.model.RolesListDtogetAllRoles(String appId) io.mosip.kernel.core.authmanager.model.MosipUserSaltListDtogetAllUserDetailsWithSalt(List<String> userDetails, String appId) io.mosip.kernel.core.authmanager.model.IndividualIdDtogetIndividualIdBasedOnUserID(String userId, String appId) getKeycloakURI(String redirectURI, String state) io.mosip.kernel.core.authmanager.model.MosipUserListDtogetListOfUsersDetails(String realmId, String roleName, int pageStart, int pageFetch, String email, String firstName, String lastName, String username, String search) io.mosip.kernel.core.authmanager.model.MosipUserListDtogetListOfUsersDetails(List<String> userDetails, String appId) io.mosip.kernel.core.authmanager.model.RIdDtogetRidBasedOnUid(String userId, String appId) io.mosip.kernel.core.authmanager.model.AuthNResponseinvalidateToken(String token) Method used for invalidate tokenio.mosip.kernel.core.authmanager.model.AccessTokenResponseDTOloginRedirect(String state, String sessionState, String code, String stateCookie, String redirectURI) io.mosip.kernel.core.authmanager.model.AuthResponseDtologoutUser(String token) io.mosip.kernel.core.authmanager.model.RefreshTokenResponserefreshToken(String appID, String refreshToken, io.mosip.kernel.core.authmanager.model.RefreshTokenRequest refreshTokenRequest) Method used for generating refresh tokenio.mosip.kernel.core.authmanager.model.MosipUserDtoregisterUser(io.mosip.kernel.core.authmanager.model.UserRegistrationRequestDto userCreationRequestDto) io.mosip.kernel.core.authmanager.model.MosipUserDtovaldiateToken(String token) io.mosip.kernel.core.authmanager.model.MosipUserTokenDtovalidateToken(String token) Method used for validating Auth token
-
Constructor Details
-
AuthServiceImpl
public AuthServiceImpl()
-
-
Method Details
-
validateToken
public io.mosip.kernel.core.authmanager.model.MosipUserTokenDto validateToken(String token) throws Exception Method used for validating Auth token- Specified by:
validateTokenin interfaceAuthZService- Parameters:
token- token- Returns:
- mosipUserDtoToken is of type
MosipUserTokenDto - Throws:
Exception- exception
-
authenticateUser
public io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateUser(io.mosip.kernel.core.authmanager.model.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 io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateWithOtp(io.mosip.kernel.core.authmanager.model.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 io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateUserWithOtp(io.mosip.kernel.core.authmanager.model.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 io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateWithSecretKey(io.mosip.kernel.core.authmanager.model.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 io.mosip.kernel.core.authmanager.model.RefreshTokenResponse refreshToken(String appID, String refreshToken, io.mosip.kernel.core.authmanager.model.RefreshTokenRequest refreshTokenRequest) throws Exception Method used for generating refresh token- Specified by:
refreshTokenin interfaceAuthService- Parameters:
refreshToken- existing refresh token- Returns:
- mosipUserDtoToken is of type
MosipUserTokenDto - Throws:
Exception- exception
-
invalidateToken
public io.mosip.kernel.core.authmanager.model.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
- Specified by:
getAllRolesin interfaceAuthService
-
getListOfUsersDetails
public io.mosip.kernel.core.authmanager.model.MosipUserListDto getListOfUsersDetails(List<String> userDetails, String appId) throws Exception - Specified by:
getListOfUsersDetailsin interfaceAuthService- Throws:
Exception
-
getAllUserDetailsWithSalt
public io.mosip.kernel.core.authmanager.model.MosipUserSaltListDto getAllUserDetailsWithSalt(List<String> userDetails, String appId) throws Exception - Specified by:
getAllUserDetailsWithSaltin interfaceAuthService- Throws:
Exception
-
getRidBasedOnUid
public io.mosip.kernel.core.authmanager.model.RIdDto getRidBasedOnUid(String userId, String appId) throws Exception - Specified by:
getRidBasedOnUidin interfaceAuthService- Throws:
Exception
-
registerUser
public io.mosip.kernel.core.authmanager.model.MosipUserDto registerUser(io.mosip.kernel.core.authmanager.model.UserRegistrationRequestDto userCreationRequestDto) - Specified by:
registerUserin interfaceAuthService
-
valdiateToken
- Specified by:
valdiateTokenin interfaceAuthService
-
logoutUser
- Specified by:
logoutUserin interfaceAuthService
-
loginRedirect
public io.mosip.kernel.core.authmanager.model.AccessTokenResponseDTO loginRedirect(String state, String sessionState, String code, String stateCookie, String redirectURI) - Specified by:
loginRedirectin interfaceAuthService
-
getKeycloakURI
- Specified by:
getKeycloakURIin interfaceAuthService
-
authenticateUser
public io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateUser(io.mosip.kernel.core.authmanager.model.LoginUserWithClientId loginUser) throws Exception - Specified by:
authenticateUserin interfaceAuthNService- Throws:
Exception
-
getIndividualIdBasedOnUserID
public io.mosip.kernel.core.authmanager.model.IndividualIdDto getIndividualIdBasedOnUserID(String userId, String appId) - Specified by:
getIndividualIdBasedOnUserIDin interfaceAuthService
-
getListOfUsersDetails
public io.mosip.kernel.core.authmanager.model.MosipUserListDto getListOfUsersDetails(String realmId, String roleName, int pageStart, int pageFetch, String email, String firstName, String lastName, String username, String search) - Specified by:
getListOfUsersDetailsin interfaceAuthService
-