Interface OAuth2AccessTokenProvider

All Known Implementing Classes:
ClientCredentialsAccessTokenProvider

public interface OAuth2AccessTokenProvider
A plug-in interface for MailEventSource as a customisable way to provide an OAuth2 access token that can be used to access a mailbox via the "XOAUTH2" authentication mechanism.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets an OAuth2 access token for accessing the mailbox.
  • Method Details

    • getAccessToken

      String getAccessToken() throws jakarta.mail.MessagingException
      Gets an OAuth2 access token for accessing the mailbox.
      Returns:
      An OAuth2 access token for accessing the mailbox
      Throws:
      jakarta.mail.MessagingException - If there are problems retrieving the access token, a MessagingException will be thrown.