MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / generateNonce

Function generateNonce

server-source-code/internal/auth/oidc/client.go:147–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145}
146
147func generateNonce() (string, error) {
148 b := make([]byte, 32)
149 if _, err := rand.Read(b); err != nil {
150 return "", err
151 }
152 return base64.RawURLEncoding.EncodeToString(b), nil
153}
154
155// Exchange exchanges the authorization code for tokens and fetches UserInfo.
156func (c *Client) Exchange(ctx context.Context, code, codeVerifier, expectedState, expectedNonce string, callbackParams url.Values) (*UserInfo, error) {

Callers 1

AuthCodeURLMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected