Skip to content

Commit

Permalink
Add oauth2 to the provider
Browse files Browse the repository at this point in the history
---

*Motivation*

Add oauth2 authentication can be constructed by name.
  • Loading branch information
zymap committed Jul 31, 2020
1 parent 975eb37 commit 6dad53c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pulsar/internal/auth/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ 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 6dad53c

Please sign in to comment.