MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / CreateAuthorizeCodeSession

Method CreateAuthorizeCodeSession

internal/oauth/storage.go:185–191  ·  view source on GitHub ↗

===================================================================== AuthorizeCodeStorage ===================================================================== CreateAuthorizeCodeSession persists a new authorization code's fosite.Requester under the supplied signature. fosite calls this once per /a

(_ context.Context, signature string, req fosite.Requester)

Source from the content-addressed store, hash-verified

183// once per /authorize that yields a code; the signature is the HMAC
184// of the code, so a DB read can't replay the actual code value.
185func (s *Storage) CreateAuthorizeCodeSession(_ context.Context, signature string, req fosite.Requester) error {
186 r, err := requesterToOAuthRequest(req, signature)
187 if err != nil {
188 return err
189 }
190 return s.store.CreateAuthorizationCode(r)
191}
192
193// reusedByAnotherClient reports whether a reused (invalidated or inactive)
194// code or refresh token is being presented by a client other than the one

Calls 2

requesterToOAuthRequestFunction · 0.85