Skip to content

Commit

Permalink
Add oauth2 to the provider (apache#338)
Browse files Browse the repository at this point in the history
---

*Motivation*

Add oauth2 authentication can be constructed by name.
  • Loading branch information
zymap authored Jul 31, 2020
1 parent c0cba32 commit 27a9c06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pulsar/internal/auth/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func NewProvider(name string, params string) (Provider, error) {
case "athenz", "org.apache.pulsar.client.impl.auth.AuthenticationAthenz":
return NewAuthenticationAthenzWithParams(m)

case "oauth2", "org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2":
return NewAuthenticationOAuth2WithParams(m)

default:
return nil, errors.New(fmt.Sprintf("invalid auth provider '%s'", name))
}
Expand Down

0 comments on commit 27a9c06

Please sign in to comment.