MCPcopy Index your code
hub / github.com/coder/coder / generateClientCredentials

Function generateClientCredentials

coderd/oauth2provider/registration.go:500–508  ·  view source on GitHub ↗

Helper functions for RFC 7591 Dynamic Client Registration generateClientCredentials generates a client secret for OAuth2 apps

()

Source from the content-addressed store, hash-verified

498
499// generateClientCredentials generates a client secret for OAuth2 apps
500func generateClientCredentials() (plaintext string, hashed []byte, err error) {
501 // Use the same pattern as existing OAuth2 app secrets
502 secret, err := GenerateSecret()
503 if err != nil {
504 return "", nil, xerrors.Errorf("generate secret: %w", err)
505 }
506
507 return secret.Formatted, secret.Hashed, nil
508}
509
510// generateRegistrationAccessToken generates a registration access token for RFC 7592
511func generateRegistrationAccessToken() (plaintext string, hashed []byte, err error) {

Callers 1

Calls 2

GenerateSecretFunction · 0.70
ErrorfMethod · 0.45

Tested by

no test coverage detected