Skip to content

Commit fd2acbd

Browse files
authored
fix(authenticator): fix personal access token authenticator (#53)
Fixes the personal access token authenticator by setting the authentication scheme and token on the request instead of on the Resty client. Signed-off-by: Mark Freriks <m.freriks@avisi.nl>
1 parent fe65320 commit fd2acbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/acloudapi/authenticator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func NewPersonalAccessTokenAuthenticator(token string) Authenticator {
1919
}
2020

2121
func (m *personalAccessTokenAuthenticator) Authenticate(c *resty.Client, r *resty.Request) error {
22-
c.SetAuthScheme("Token")
23-
c.SetAuthToken(m.token)
22+
r.SetAuthScheme("Token")
23+
r.SetAuthToken(m.token)
2424
return nil
2525
}

0 commit comments

Comments
 (0)