Update API codes (#336)
This commit is contained in:
1 parent
99d5456d7a
commit
f94f21fd97
74 files changed
+1557
-1802
No files matched your search
@@ -228,14 +228,6 @@ func wrapHandlerWithCommonFuncs(h http.Handler, c *Controller, props HandlerProp
|
||||
}
|
||||
|
||||
requestInfo.PublicId, requestInfo.Token, requestInfo.TokenFormat = auth.GetTokenFromRequest(c.logger, c.kms, r)
|
||||
if requestInfo.TokenFormat == auth.AuthTokenTypeInvalid {
|
||||
if disableAuthzFailures {
|
||||
requestInfo.TokenFormat = auth.AuthTokenTypeBearer
|
||||
} else {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
}
|
||||
ctx = auth.NewVerifierContext(ctx, c.logger, c.IamRepoFn, c.AuthTokenRepoFn, c.ServersRepoFn, c.kms, requestInfo)
|
||||
|
||||
// Set the context back on the request
|
||||
|
||||
Reference in new issue
Block a user