Interface LineOAuthClient


public interface LineOAuthClient
An OAuth client that issues or revokes channel access tokens. See document for detail.
  • Method Details

    • builder

      static LineOAuthClientBuilder builder()
    • getsAllValidChannelAccessTokenKeyIdsByJWT

      CompletableFuture<com.linecorp.bot.model.oauth.ChannelAccessTokenKeyIdsResponse> getsAllValidChannelAccessTokenKeyIdsByJWT(String jwt)
      Gets all valid channel access token key IDs.
      Parameters:
      jwt - A JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key.
      Returns:
      Get all valid channel access token key IDs v2.1
    • issueChannelTokenByJWT

      CompletableFuture<com.linecorp.bot.model.oauth.IssueChannelAccessTokenResponse> issueChannelTokenByJWT(String clientAssertion)
      Issues a channel access token. This method lets you use JWT assertion for authentication.

      You can issue up to 30 tokens. If you reach the maximum limit, additional requests of issuing channel access tokens are blocked.

      Parameters:
      clientAssertion - A JSON Web Token the client needs to create and sign with the private key created when issuing an assertion signing key.
      See Also:
    • revokeChannelTokenByJWT

      CompletableFuture<Void> revokeChannelTokenByJWT(String clientId, String clientSecret, String accessToken)
      Revokes a channel access token.
      Parameters:
      clientId - Channel ID
      clientSecret - Channel Secret
      accessToken - Channel access token
      See Also:
    • issueChannelToken

      CompletableFuture<com.linecorp.bot.model.oauth.IssueChannelAccessTokenResponse> issueChannelToken(com.linecorp.bot.model.oauth.IssueChannelAccessTokenRequest req)
      Issues a short-lived channel access token. Up to 30 tokens can be issued. If the maximum is exceeded, existing channel access tokens are revoked in the order of when they were first issued. It will return a failed CompletableFuture with ChannelAccessTokenException if it has an error during calling the API.
    • revokeChannelToken

      CompletableFuture<Void> revokeChannelToken(String accessToken)
      Revokes a channel access token. It will return a failed CompletableFuture with ChannelAccessTokenException if it has an error during calling the API.