ory-am/hydra

View on GitHub
jwk/helper.go

Summary

Maintainability
A
1 hr
Test Coverage

Function GetOrGenerateKeys has 6 return statements (exceeds 4 allowed).
Open

func GetOrGenerateKeys(ctx context.Context, r InternalRegistry, m Manager, set, kid, alg string) (private *jose.JSONWebKey, err error) {
    getLock(set).Lock()
    defer getLock(set).Unlock()

    keys, err := m.GetKeySet(ctx, set)
Severity: Major
Found in jwk/helper.go - About 40 mins to fix

    Function OnlyPublicSDKKeys has 5 return statements (exceeds 4 allowed).
    Open

    func OnlyPublicSDKKeys(in []hydra.JsonWebKey) (out []hydra.JsonWebKey, _ error) {
        var interim []jose.JSONWebKey
        var b bytes.Buffer
    
        if err := json.NewEncoder(&b).Encode(&in); err != nil {
    Severity: Major
    Found in jwk/helper.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status