Documentation
¶
Index ¶
- Constants
- func GetDefaultTransport(config *common.Config) http.RoundTripper
- func MakeKeyringStore() (store.Store, error)
- type OAuth2Provider
- type Provider
- type TLSAuthProvider
- type TokenAuthProvider
- func NewAuthenticationToken(token string, transport http.RoundTripper) (*TokenAuthProvider, error)
- func NewAuthenticationTokenFromAuthParams(encodedAuthParam string, transport http.RoundTripper) (*TokenAuthProvider, error)
- func NewAuthenticationTokenFromFile(tokenFilePath string, transport http.RoundTripper) (*TokenAuthProvider, error)
- type Transport
Constants ¶
View Source
const ( TypeClientCredential = "client_credentials" TypeDeviceCode = "device_code" )
View Source
const (
TLSPluginName = "org.apache.pulsar.client.impl.auth.AuthenticationTls"
)
View Source
const (
TokenPluginName = "org.apache.pulsar.client.impl.auth.AuthenticationToken"
)
Variables ¶
This section is empty.
Functions ¶
func GetDefaultTransport ¶ added in v0.5.0
func GetDefaultTransport(config *common.Config) http.RoundTripper
func MakeKeyringStore ¶ added in v0.5.0
Types ¶
type OAuth2Provider ¶ added in v0.5.0
type OAuth2Provider struct {
// contains filtered or unexported fields
}
func NewAuthenticationOAuth2 ¶ added in v0.5.0
func NewAuthenticationOAuth2WithParams ¶ added in v0.5.0
func NewAuthenticationOAuth2WithParams( issueEndpoint, clientID, audience string, transport http.RoundTripper) (*OAuth2Provider, error)
func (*OAuth2Provider) Transport ¶ added in v0.5.0
func (o *OAuth2Provider) Transport() http.RoundTripper
func (*OAuth2Provider) WithTransport ¶ added in v0.5.0
func (o *OAuth2Provider) WithTransport(tripper http.RoundTripper)
type Provider ¶ added in v0.2.0
type Provider interface { RoundTrip(req *http.Request) (*http.Response, error) Transport() http.RoundTripper WithTransport(tripper http.RoundTripper) }
Provider provide a general method to add auth message
func GetAuthProvider ¶ added in v0.4.0
type TLSAuthProvider ¶
type TLSAuthProvider struct { T http.RoundTripper // contains filtered or unexported fields }
func NewAuthenticationTLS ¶
func NewAuthenticationTLS(certificatePath string, privateKeyPath string, transport http.RoundTripper) (*TLSAuthProvider, error)
NewAuthenticationTLS initialize the authentication provider
func NewAuthenticationTLSFromAuthParams ¶ added in v0.4.0
func NewAuthenticationTLSFromAuthParams(encodedAuthParams string, transport http.RoundTripper) (*TLSAuthProvider, error)
func (*TLSAuthProvider) GetTLSCertificate ¶
func (p *TLSAuthProvider) GetTLSCertificate() (*tls.Certificate, error)
func (*TLSAuthProvider) Transport ¶ added in v0.4.0
func (p *TLSAuthProvider) Transport() http.RoundTripper
func (*TLSAuthProvider) WithTransport ¶ added in v0.5.0
func (p *TLSAuthProvider) WithTransport(tripper http.RoundTripper)
type TokenAuthProvider ¶
type TokenAuthProvider struct { T http.RoundTripper // contains filtered or unexported fields }
func NewAuthenticationToken ¶
func NewAuthenticationToken(token string, transport http.RoundTripper) (*TokenAuthProvider, error)
NewAuthenticationToken return a interface of Provider with a string token.
func NewAuthenticationTokenFromAuthParams ¶ added in v0.4.0
func NewAuthenticationTokenFromAuthParams(encodedAuthParam string, transport http.RoundTripper) (*TokenAuthProvider, error)
func NewAuthenticationTokenFromFile ¶
func NewAuthenticationTokenFromFile(tokenFilePath string, transport http.RoundTripper) (*TokenAuthProvider, error)
NewAuthenticationTokenFromFile return a interface of a Provider with a string token file path.
func (*TokenAuthProvider) Transport ¶ added in v0.4.0
func (p *TokenAuthProvider) Transport() http.RoundTripper
func (*TokenAuthProvider) WithTransport ¶ added in v0.5.0
func (p *TokenAuthProvider) WithTransport(tripper http.RoundTripper)
type Transport ¶ added in v0.4.0
type Transport struct {
T http.RoundTripper
}
Click to show internal directories.
Click to hide internal directories.