Enhancing the UserService class

Pragya Keshap answered on February 18, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Microservice Development: Creating User-Service which is responsible for Managing users
  • Enhancing the UserRepository class

  • Enhancing the UserService class

    0

    We also need to add new methods into UserService for the UserApi interface. Let's add new methods into the service, as follows:

    findUserByUsername(): Finds and returns a user based on a given username.

    createUser(): Adds a new signed-up user to the database.

    getSignedInUser(): Creates a new model instance of SignedInUser that holds the refresh token, access token (JWT), user ID, and username.

    getAcceessToken(): Generates and returns a new access token (JWT) for a given valid refresh token.

    removeRefreshToken(): Removes the refresh token from the database. It is called when the user wants to sign out.

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: class java
    Link to this answer
    Share Copy Link
    Contributed on Feb 18 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.