Class MetadataAccessTokenWriter

  • All Implemented Interfaces:
    ComponentLifecycle, AccessTokenWriter

    @ComponentProfile(summary="Write the OAUTH token to metadata",
                      since="3.10.1")
    public class MetadataAccessTokenWriter
    extends java.lang.Object
    implements AccessTokenWriter
    Write the token to metadata.

    In the adapter configuration file this class is aliased as oauth-access-token-to-metadata which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • MetadataAccessTokenWriter

        public MetadataAccessTokenWriter()
    • Method Detail

      • getTokenKey

        public java.lang.String getTokenKey()
      • setTokenKey

        public void setTokenKey​(java.lang.String key)
        Set the metadata to store the token against.
        Parameters:
        key - the key.
      • getTokenExpiryKey

        public java.lang.String getTokenExpiryKey()
      • setTokenExpiryKey

        public void setTokenExpiryKey​(java.lang.String key)
        Set the metadata key for storing the expiry.

        In some cases, there is no expiry date for a token, in which case, the metadata key will never be set even if configured. Depending on how you have configured your expiry token, this might be an absolute ISO8601 date, or relative time in seconds.

        Parameters:
        key - key.
      • getRefreshTokenKey

        public java.lang.String getRefreshTokenKey()
      • setRefreshTokenKey

        public void setRefreshTokenKey​(java.lang.String key)
        Set the metadata key for storing the refresh token.

        In some cases, there is no refresh token, in which case, the metadata key will never be set even if configured.

        Parameters:
        key - key.