Skip to content

Commit

Permalink
client: change AuthToken option signature
Browse files Browse the repository at this point in the history
Signed-off-by: Vasiliy Tolstov <[email protected]>
  • Loading branch information
vtolstov committed Jul 9, 2021
1 parent d49afa2 commit 0d1ef31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ type CallOptions struct {
RequestTimeout time.Duration
// DialTimeout dial timeout
DialTimeout time.Duration
// AuthToken flag
AuthToken bool
// AuthToken string
AuthToken string
}

// Context pass context to client
Expand Down Expand Up @@ -463,9 +463,9 @@ func WithDialTimeout(d time.Duration) CallOption {

// WithAuthToken is a CallOption which overrides the
// authorization header with the services own auth token
func WithAuthToken() CallOption {
func WithAuthToken(t string) CallOption {
return func(o *CallOptions) {
o.AuthToken = true
o.AuthToken = t
}
}

Expand Down

0 comments on commit 0d1ef31

Please sign in to comment.