Class AccessTokenResponse

java.lang.Object
io.github.openpaydev.mpesa.core.models.AccessTokenResponse

public final class AccessTokenResponse extends Object
Represents the response object received from the M-Pesa OAuth token generation endpoint.

This is an internal model used by the TokenManager to deserialize the authentication response.

  • Method Details

    • builder

    • getAccessToken

      public String getAccessToken()
      The actual OAuth 2.0 access token used for authorizing API requests.
    • getExpiresIn

      public long getExpiresIn()
      The duration for which the access token is valid, in seconds. The M-Pesa API typically returns "3599" for a one-hour validity.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object