MCPcopy Create free account
hub / github.com/bytebase/bytebase / generateClientID

Function generateClientID

backend/api/oauth2/oauth2.go:103–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103func generateClientID() (string, error) {
104 // Use 24 bytes for client ID (shorter than refresh tokens)
105 bytes := make([]byte, 24)
106 if _, err := rand.Read(bytes); err != nil {
107 return "", err
108 }
109 return clientIDPrefix + base64.RawURLEncoding.EncodeToString(bytes), nil
110}
111
112func generateClientSecret() (string, error) {
113 token, err := auth.GenerateOpaqueToken()

Callers 1

handleRegisterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected