projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
8460: Move loggedDuration from keepstore to sdk pkg as stats.Duration.
[arvados.git]
/
sdk
/
go
/
auth
/
auth.go
diff --git
a/sdk/go/auth/auth.go
b/sdk/go/auth/auth.go
index 41cfb993726d9179fffbb187cad3ec96e8b8f952..ca4eb948b1220c982ef25fa03c9175f40148a797 100644
(file)
--- 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)
}
// 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) {
func (a *Credentials) loadTokenFromCookie(r *http.Request) {
- cookie, err := r.Cookie("api_token")
+ cookie, err := r.Cookie("a
rvados_a
pi_token")
if err != nil || len(cookie.Value) == 0 {
return
}
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))
}
}
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.