Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions auth/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type AuthInfo struct {
// be used only by the entity that has performed that authentication
// on the given http request already and has the relevant Auth Info
// Context.
func SetAuthInfoHeader(r http.Request, info *AuthInfo) error {
func SetAuthInfoHeader(r *http.Request, info *AuthInfo) error {
b, err := json.Marshal(info)
if err != nil {
return errors.Wrapf(errors.InvalidArgument, "failed to generate user info: %s", err)
Expand All @@ -38,7 +38,7 @@ func SetAuthInfoHeader(r http.Request, info *AuthInfo) error {
}

// gets Auth Info Header available in the Http Request
func GetAuthInfoHeader(r http.Request) (*AuthInfo, error) {
func GetAuthInfoHeader(r *http.Request) (*AuthInfo, error) {
val := r.Header.Get(httpClientAuthContext)
if val == "" {
return nil, errors.Wrapf(errors.NotFound, "Auth info not available in the http request")
Expand All @@ -56,6 +56,6 @@ func GetAuthInfoHeader(r http.Request) (*AuthInfo, error) {
}

// delete the Auth info header from the given HTTP request
func DeleteAuthInfoHeader(r http.Request) {
func DeleteAuthInfoHeader(r *http.Request) {
r.Header.Del(httpClientAuthContext)
}