Class 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 Detail

      • ProxyAuthServiceImpl

        public ProxyAuthServiceImpl()
    • Method Detail

      • 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
      • 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
      • 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