We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ced35 commit d9f74a5Copy full SHA for d9f74a5
token.go
@@ -102,11 +102,11 @@ func (t *Token) SetAuthHeader(r *http.Request) {
102
if strings.TrimSpace(t.CustomTokenHeaderKey) != "" {
103
headerKey = t.CustomTokenHeaderKey
104
}
105
- headerValue := strings.TrimSpace(strings.Join([]string{t.Type(), t.AccessToken}, " "))
+ headerValue := t.Type() + " " + t.AccessToken
106
if t.CustomTokenPrefix != "" {
107
- headerValue = strings.TrimSpace(strings.Join([]string{t.CustomTokenPrefix, headerValue}, ""))
+ headerValue = t.CustomTokenPrefix + headerValue
108
109
- r.Header.Set(headerKey, headerValue)
+ r.Header.Set(headerKey, strings.TrimSpace(headerValue))
110
111
112
// WithExtra returns a new Token that's a clone of t, but using the
0 commit comments