com.ibm.commerce.rest.member.handler

Class LoginIdentityHandler

  • All Implemented Interfaces:
    DocumentedResourceHandler, IResourceHandler


    @Path(value="store/{storeId}/loginidentity")
     @Encoded
    public class LoginIdentityHandler
    extends AbstractResourceHandler
    This class provides RESTful services to login and logout a registered shopper using user name and password. It calls Person noun to perform the services.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        The Constant RESOURCE_NAME.
        See Also:
        Constant Field Values
      • FORMAT_GROUP_NAME

        public static final java.lang.String FORMAT_GROUP_NAME
        The constant FORMAT_GROUP_NAME.
        See Also:
        Constant Field Values
      • PARAMETER_GENERATE_LTPA

        public static final java.lang.String PARAMETER_GENERATE_LTPA
        response format
        See Also:
        Constant Field Values
      • PARAMETER_GENERATE_LTPA_DESCRIPTION

        public static final java.lang.String PARAMETER_GENERATE_LTPA_DESCRIPTION
        response format description
        See Also:
        Constant Field Values
    • Constructor Detail

      • LoginIdentityHandler

        public LoginIdentityHandler()
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Returns:
        the resource name
      • login

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response login(@PathParam(value="storeId")
                                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                                      @QueryParam(value="generateLTPAToken")
                                                                                                                                                                                                                      java.lang.String generateLTPAToken,
                                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                                      java.lang.String responseFormat)
        Login a registered user using user name and password.
        Parameters:
        storeId - store id
        generateLTPAToken - the flag to generate LTPA token or not
        responseFormat - response format (only JSON is supported)
        Returns:
        Response containing a Map.
      • login

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response login(@PathParam(value="storeId")
                                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                                      java.lang.String responseFormat)
        Login a registered user using user name and password.
        Parameters:
        storeId - store id
        responseFormat - response format (only JSON is supported)
        Returns:
        Response containing a Map.
      • logout

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self")
        public javax.ws.rs.core.Response logout(@PathParam(value="storeId")
                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                      @QueryParam(value="generateLTPAToken")
                                                                                                                                                                                      java.lang.String generateLTPAToken,
                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                      java.lang.String responseFormat)
        Logout a registered shopper. The authentication tokens obtained during login must be sent back with the request header.
        Parameters:
        storeId - the store id
        generateLTPAToken - the flag to remove LTPA token or not
        responseFormat - the response format
        Returns:
        the response
      • logout

        @DELETE
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="@self")
        public javax.ws.rs.core.Response logout(@PathParam(value="storeId")
                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                      java.lang.String responseFormat)
        Logout a registered shopper. The authentication tokens obtained during login must be sent back with the request header.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        Returns:
        the response
      • loginUser

        public java.util.Map loginUser(BusinessContextType bContext,
                                       javax.security.auth.callback.CallbackHandler callbackHandler,
                                       java.util.Map inputData)
                                throws PersonException
        This method authenticates a user by using login name and password.
        Parameters:
        bContext - the business context
        callbackHandler - the callback handler
        inputData - The map containing user name and password
        Returns:
        the map
        Throws:
        PersonException - the person exception
      • loginUser

        public java.util.Map loginUser(BusinessContextType bContext,
                                       javax.security.auth.callback.CallbackHandler callbackHandler,
                                       java.lang.String username,
                                       java.lang.String password)
                                throws PersonException
        This method authenticates a user by using login name and password.
        Parameters:
        bContext - the b context
        callbackHandler - the callback handler
        username - the username
        password - the password
        Returns:
        the map
        Throws:
        PersonException - the person exception