X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d45dab88989fcaa157b44a014c889d664919672..6fab045dba4714e9c748337ef974ef257df37353:/sdk/go/auth/auth.go diff --git a/sdk/go/auth/auth.go b/sdk/go/auth/auth.go index 41cfb99372..ca4eb948b1 100644 --- a/sdk/go/auth/auth.go +++ b/sdk/go/auth/auth.go @@ -67,13 +67,8 @@ func (a *Credentials) LoadTokensFromHTTPRequest(r *http.Request) { // secret is known) } -// TODO: LoadTokensFromHttpRequestBody(). We can't assume in -// LoadTokensFromHttpRequest() that [or how] we should read and parse -// the request body. This has to be requested explicitly by the -// application. - func (a *Credentials) loadTokenFromCookie(r *http.Request) { - cookie, err := r.Cookie("api_token") + cookie, err := r.Cookie("arvados_api_token") if err != nil || len(cookie.Value) == 0 { return } @@ -83,3 +78,8 @@ func (a *Credentials) loadTokenFromCookie(r *http.Request) { } a.Tokens = append(a.Tokens, string(token)) } + +// TODO: LoadTokensFromHttpRequestBody(). We can't assume in +// LoadTokensFromHttpRequest() that [or how] we should read and parse +// the request body. This has to be requested explicitly by the +// application.