Class AuthenticationFactoryOAuth2
- java.lang.Object
-
- org.apache.pulsar.client.impl.auth.oauth2.AuthenticationFactoryOAuth2
-
public final class AuthenticationFactoryOAuth2 extends java.lang.ObjectFactory class that allows to createAuthenticationinstances for OAuth 2.0 authentication methods.
-
-
Constructor Summary
Constructors Constructor Description AuthenticationFactoryOAuth2()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.pulsar.client.api.AuthenticationclientCredentials(java.net.URL issuerUrl, java.net.URL credentialsUrl, java.lang.String audience)Authenticate with client credentials.static org.apache.pulsar.client.api.AuthenticationclientCredentials(java.net.URL issuerUrl, java.net.URL credentialsUrl, java.lang.String audience, java.lang.String scope)Authenticate with client credentials.
-
-
-
Method Detail
-
clientCredentials
public static org.apache.pulsar.client.api.Authentication clientCredentials(java.net.URL issuerUrl, java.net.URL credentialsUrl, java.lang.String audience)Authenticate with client credentials.- Parameters:
issuerUrl- the issuer URLcredentialsUrl- the credentials URLaudience- An optional field. The audience identifier used by some Identity Providers, like Auth0.- Returns:
- an Authentication object
-
clientCredentials
public static org.apache.pulsar.client.api.Authentication clientCredentials(java.net.URL issuerUrl, java.net.URL credentialsUrl, java.lang.String audience, java.lang.String scope)Authenticate with client credentials.- Parameters:
issuerUrl- the issuer URLcredentialsUrl- the credentials URLaudience- An optional field. The audience identifier used by some Identity Providers, like Auth0.scope- An optional field. The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope. From here: https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.2- Returns:
- an Authentication object
-
-