Class AuthenticationOAuth2

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, org.apache.pulsar.client.api.Authentication, org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport

    public class AuthenticationOAuth2
    extends java.lang.Object
    implements org.apache.pulsar.client.api.Authentication, org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport
    Pulsar client authentication provider based on OAuth 2.0.
    See Also:
    Serialized Form
    • Constructor Detail

      • AuthenticationOAuth2

        public AuthenticationOAuth2()
    • Method Detail

      • getAuthMethodName

        public java.lang.String getAuthMethodName()
        Specified by:
        getAuthMethodName in interface org.apache.pulsar.client.api.Authentication
      • configure

        public void configure​(java.lang.String encodedAuthParamString)
        Specified by:
        configure in interface org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport
      • configure

        @Deprecated
        public void configure​(java.util.Map<java.lang.String,​java.lang.String> authParams)
        Deprecated.
        Specified by:
        configure in interface org.apache.pulsar.client.api.Authentication
      • start

        public void start()
                   throws org.apache.pulsar.client.api.PulsarClientException
        Specified by:
        start in interface org.apache.pulsar.client.api.Authentication
        Throws:
        org.apache.pulsar.client.api.PulsarClientException
      • getAuthData

        public org.apache.pulsar.client.api.AuthenticationDataProvider getAuthData()
                                                                            throws org.apache.pulsar.client.api.PulsarClientException
        Specified by:
        getAuthData in interface org.apache.pulsar.client.api.Authentication
        Throws:
        org.apache.pulsar.client.api.PulsarClientException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException