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 AuthService
Proxy 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.mosip.kernel.core.authmanager.model.AuthNResponseDto
    authenticateUser(io.mosip.kernel.core.authmanager.model.LoginUser loginUser)
    Method used for Authenticating User based on username and password
    io.mosip.kernel.core.authmanager.model.AuthNResponseDto
    authenticateUser(io.mosip.kernel.core.authmanager.model.LoginUserWithClientId loginUser)
     
    io.mosip.kernel.core.authmanager.model.AuthNResponseDto
    authenticateUserWithOtp(io.mosip.kernel.core.authmanager.model.UserOtp userOtp)
    Method used for Authenticating User based with username and OTP
    io.mosip.kernel.core.authmanager.model.AuthNResponseDto
    authenticateWithOtp(io.mosip.kernel.core.authmanager.model.OtpUser otpUser)
    Method used for sending OTP
    io.mosip.kernel.core.authmanager.model.AuthNResponseDto
    authenticateWithSecretKey(io.mosip.kernel.core.authmanager.model.ClientSecret clientSecret)
    Method used for Authenticating User based with secretkey and password
    io.mosip.kernel.core.authmanager.model.RolesListDto
     
    io.mosip.kernel.core.authmanager.model.MosipUserSaltListDto
     
    io.mosip.kernel.core.authmanager.model.IndividualIdDto
     
    getKeycloakURI(String redirectURI, String state)
     
    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)
     
    io.mosip.kernel.core.authmanager.model.MosipUserListDto
    getListOfUsersDetails(List<String> userDetails, String appId)
     
    io.mosip.kernel.core.authmanager.model.RIdDto
    getRidBasedOnUid(String userId, String appId)
     
    io.mosip.kernel.core.authmanager.model.AuthNResponse
    Method used for invalidate token
    io.mosip.kernel.core.authmanager.model.AccessTokenResponseDTO
    loginRedirect(String state, String sessionState, String code, String stateCookie, String redirectURI)
     
    io.mosip.kernel.core.authmanager.model.AuthResponseDto
     
    io.mosip.kernel.core.authmanager.model.RefreshTokenResponse
    refreshToken(String appID, String refereshToken, io.mosip.kernel.core.authmanager.model.RefreshTokenRequest refreshTokenRequest)
    Method used for generating refresh token
    io.mosip.kernel.core.authmanager.model.MosipUserDto
    registerUser(io.mosip.kernel.core.authmanager.model.UserRegistrationRequestDto userCreationRequestDto)
     
    io.mosip.kernel.core.authmanager.model.MosipUserDto
     
    io.mosip.kernel.core.authmanager.model.MosipUserTokenDto
    Deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProxyAuthServiceImpl

      public ProxyAuthServiceImpl()
  • Method Details

    • validateToken

      @Deprecated public io.mosip.kernel.core.authmanager.model.MosipUserTokenDto validateToken(String token) throws Exception
      Deprecated.
      Method used for validating Auth token
      Specified by:
      validateToken in interface AuthZService
      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:
      authenticateUser in interface AuthNService
      Parameters:
      loginUser - is of type LoginUser
      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:
      authenticateWithOtp in interface AuthNService
      Parameters:
      otpUser - is of type OtpUser
      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:
      authenticateUserWithOtp in interface AuthNService
      Parameters:
      userOtp - is of type UserOtp
      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:
      authenticateWithSecretKey in interface AuthNService
      Parameters:
      clientSecret - is of type ClientSecret
      Returns:
      authNResponseDto is of type AuthNResponseDto
      Throws:
      Exception - exception
    • refreshToken

      public io.mosip.kernel.core.authmanager.model.RefreshTokenResponse refreshToken(String appID, String refereshToken, io.mosip.kernel.core.authmanager.model.RefreshTokenRequest refreshTokenRequest) throws Exception
      Method used for generating refresh token
      Specified by:
      refreshToken in interface AuthService
      Parameters:
      appID -
      refereshToken -
      refreshTokenRequest -
      Returns:
      Throws:
      Exception
    • invalidateToken

      public io.mosip.kernel.core.authmanager.model.AuthNResponse invalidateToken(String token) throws Exception
      Method used for invalidate token
      Specified by:
      invalidateToken in interface AuthService
      Parameters:
      token - token
      Returns:
      authNResponse is of type AuthNResponse
      Throws:
      Exception - exception
    • getAllRoles

      public io.mosip.kernel.core.authmanager.model.RolesListDto getAllRoles(String appId)
      Specified by:
      getAllRoles in interface AuthService
    • getListOfUsersDetails

      public io.mosip.kernel.core.authmanager.model.MosipUserListDto getListOfUsersDetails(List<String> userDetails, String appId) throws Exception
      Specified by:
      getListOfUsersDetails in interface AuthService
      Throws:
      Exception
    • getAllUserDetailsWithSalt

      public io.mosip.kernel.core.authmanager.model.MosipUserSaltListDto getAllUserDetailsWithSalt(List<String> userDetails, String appId) throws Exception
      Specified by:
      getAllUserDetailsWithSalt in interface AuthService
      Throws:
      Exception
    • getRidBasedOnUid

      public io.mosip.kernel.core.authmanager.model.RIdDto getRidBasedOnUid(String userId, String appId) throws Exception
      Specified by:
      getRidBasedOnUid in interface AuthService
      Throws:
      Exception
    • registerUser

      public io.mosip.kernel.core.authmanager.model.MosipUserDto registerUser(io.mosip.kernel.core.authmanager.model.UserRegistrationRequestDto userCreationRequestDto)
      Specified by:
      registerUser in interface AuthService
    • valdiateToken

      public io.mosip.kernel.core.authmanager.model.MosipUserDto valdiateToken(String token)
      Specified by:
      valdiateToken in interface AuthService
    • logoutUser

      public io.mosip.kernel.core.authmanager.model.AuthResponseDto logoutUser(String token)
      Specified by:
      logoutUser in interface AuthService
    • loginRedirect

      public io.mosip.kernel.core.authmanager.model.AccessTokenResponseDTO loginRedirect(String state, String sessionState, String code, String stateCookie, String redirectURI)
      Specified by:
      loginRedirect in interface AuthService
    • getKeycloakURI

      public String getKeycloakURI(String redirectURI, String state)
      Specified by:
      getKeycloakURI in interface AuthService
    • authenticateUser

      public io.mosip.kernel.core.authmanager.model.AuthNResponseDto authenticateUser(io.mosip.kernel.core.authmanager.model.LoginUserWithClientId loginUser) throws Exception
      Specified by:
      authenticateUser in interface AuthNService
      Throws:
      Exception
    • getIndividualIdBasedOnUserID

      public io.mosip.kernel.core.authmanager.model.IndividualIdDto getIndividualIdBasedOnUserID(String userId, String appId)
      Specified by:
      getIndividualIdBasedOnUserID in interface AuthService
    • 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:
      getListOfUsersDetails in interface AuthService