ory-am/hydra

View on GitHub
oauth2/oauth2_provider_mock_test.go

Summary

Maintainability
D
2 days
Test Coverage

Method MockOAuth2Provider.IntrospectToken has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (m *MockOAuth2Provider) IntrospectToken(arg0 context.Context, arg1 string, arg2 fosite.TokenType, arg3 fosite.Session, arg4 ...string) (fosite.TokenType, fosite.AccessRequester, error) {
Severity: Minor
Found in oauth2/oauth2_provider_mock_test.go - About 35 mins to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewAccessRequest(arg0 context.Context, arg1 *http.Request, arg2 fosite.Session) (fosite.AccessRequester, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewAccessRequest", arg0, arg1, arg2)
        ret0, _ := ret[0].(fosite.AccessRequester)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 125..131

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 141.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewIntrospectionRequest(arg0 context.Context, arg1 *http.Request, arg2 fosite.Session) (fosite.IntrospectionResponder, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewIntrospectionRequest", arg0, arg1, arg2)
        ret0, _ := ret[0].(fosite.IntrospectionResponder)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 65..71

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 141.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewAuthorizeResponse(arg0 context.Context, arg1 fosite.AuthorizeRequester, arg2 fosite.Session) (fosite.AuthorizeResponder, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewAuthorizeResponse", arg0, arg1, arg2)
        ret0, _ := ret[0].(fosite.AuthorizeResponder)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 155..161

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 139.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewPushedAuthorizeResponse(arg0 context.Context, arg1 fosite.AuthorizeRequester, arg2 fosite.Session) (fosite.PushedAuthorizeResponder, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewPushedAuthorizeResponse", arg0, arg1, arg2)
        ret0, _ := ret[0].(fosite.PushedAuthorizeResponder)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 110..116

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 139.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewAuthorizeRequest(arg0 context.Context, arg1 *http.Request) (fosite.AuthorizeRequester, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewAuthorizeRequest", arg0, arg1)
        ret0, _ := ret[0].(fosite.AuthorizeRequester)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 140..146

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (m *MockOAuth2Provider) NewPushedAuthorizeRequest(arg0 context.Context, arg1 *http.Request) (fosite.AuthorizeRequester, error) {
        m.ctrl.T.Helper()
        ret := m.ctrl.Call(m, "NewPushedAuthorizeRequest", arg0, arg1)
        ret0, _ := ret[0].(fosite.AuthorizeRequester)
        ret1, _ := ret[1].(error)
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 1 other location - About 1 hr to fix
    oauth2/oauth2_provider_mock_test.go on lines 95..101

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteAccessResponse(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteAccessResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteAccessResponse), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 190..193
    oauth2/oauth2_provider_mock_test.go on lines 214..217
    oauth2/oauth2_provider_mock_test.go on lines 226..229
    oauth2/oauth2_provider_mock_test.go on lines 262..265
    oauth2/oauth2_provider_mock_test.go on lines 274..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteAccessError(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteAccessError", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteAccessError), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 202..205
    oauth2/oauth2_provider_mock_test.go on lines 214..217
    oauth2/oauth2_provider_mock_test.go on lines 226..229
    oauth2/oauth2_provider_mock_test.go on lines 262..265
    oauth2/oauth2_provider_mock_test.go on lines 274..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteAuthorizeError(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteAuthorizeError", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteAuthorizeError), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 190..193
    oauth2/oauth2_provider_mock_test.go on lines 202..205
    oauth2/oauth2_provider_mock_test.go on lines 226..229
    oauth2/oauth2_provider_mock_test.go on lines 262..265
    oauth2/oauth2_provider_mock_test.go on lines 274..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WritePushedAuthorizeResponse(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePushedAuthorizeResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).WritePushedAuthorizeResponse), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 190..193
    oauth2/oauth2_provider_mock_test.go on lines 202..205
    oauth2/oauth2_provider_mock_test.go on lines 214..217
    oauth2/oauth2_provider_mock_test.go on lines 226..229
    oauth2/oauth2_provider_mock_test.go on lines 262..265

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteAuthorizeResponse(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteAuthorizeResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteAuthorizeResponse), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 190..193
    oauth2/oauth2_provider_mock_test.go on lines 202..205
    oauth2/oauth2_provider_mock_test.go on lines 214..217
    oauth2/oauth2_provider_mock_test.go on lines 262..265
    oauth2/oauth2_provider_mock_test.go on lines 274..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WritePushedAuthorizeError(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePushedAuthorizeError", reflect.TypeOf((*MockOAuth2Provider)(nil).WritePushedAuthorizeError), arg0, arg1, arg2, arg3)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 5 other locations - About 45 mins to fix
    oauth2/oauth2_provider_mock_test.go on lines 190..193
    oauth2/oauth2_provider_mock_test.go on lines 202..205
    oauth2/oauth2_provider_mock_test.go on lines 214..217
    oauth2/oauth2_provider_mock_test.go on lines 226..229
    oauth2/oauth2_provider_mock_test.go on lines 274..277

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteIntrospectionResponse(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteIntrospectionResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteIntrospectionResponse), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteIntrospectionError(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteIntrospectionError", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteIntrospectionError), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 250..253
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewAccessRequest(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccessRequest", reflect.TypeOf((*MockOAuth2Provider)(nil).NewAccessRequest), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 250..253
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewIntrospectionRequest(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewIntrospectionRequest", reflect.TypeOf((*MockOAuth2Provider)(nil).NewIntrospectionRequest), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 250..253
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewPushedAuthorizeResponse(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewPushedAuthorizeResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).NewPushedAuthorizeResponse), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 250..253
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) WriteRevocationResponse(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteRevocationResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).WriteRevocationResponse), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 119..122
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 250..253

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 17 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewAuthorizeResponse(arg0, arg1, arg2 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAuthorizeResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).NewAuthorizeResponse), arg0, arg1, arg2)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 16 other locations - About 45 mins to fix
    hsm/crypto11_mock_test.go on lines 54..57
    hsm/crypto11_mock_test.go on lines 97..100
    hsm/hsm_mock_test.go on lines 84..87
    hsm/hsm_mock_test.go on lines 99..102
    jwk/manager_mock_test.go on lines 50..53
    jwk/manager_mock_test.go on lines 64..67
    jwk/manager_mock_test.go on lines 78..81
    jwk/manager_mock_test.go on lines 122..125
    jwk/manager_mock_test.go on lines 151..154
    jwk/manager_mock_test.go on lines 165..168
    oauth2/oauth2_provider_mock_test.go on lines 74..77
    oauth2/oauth2_provider_mock_test.go on lines 134..137
    oauth2/oauth2_provider_mock_test.go on lines 164..167
    oauth2/oauth2_provider_mock_test.go on lines 238..241
    oauth2/oauth2_provider_mock_test.go on lines 250..253
    oauth2/oauth2_provider_mock_test.go on lines 286..289

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 115.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewAccessResponse(arg0, arg1 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccessResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).NewAccessResponse), arg0, arg1)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 8 other locations - About 45 mins to fix
    hsm/hsm_mock_test.go on lines 54..57
    hsm/hsm_mock_test.go on lines 69..72
    hsm/hsm_mock_test.go on lines 114..117
    jwk/manager_mock_test.go on lines 92..95
    jwk/manager_mock_test.go on lines 137..140
    oauth2/oauth2_provider_mock_test.go on lines 104..107
    oauth2/oauth2_provider_mock_test.go on lines 149..152
    oauth2/oauth2_provider_mock_test.go on lines 178..181

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewAuthorizeRequest(arg0, arg1 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAuthorizeRequest", reflect.TypeOf((*MockOAuth2Provider)(nil).NewAuthorizeRequest), arg0, arg1)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 8 other locations - About 45 mins to fix
    hsm/hsm_mock_test.go on lines 54..57
    hsm/hsm_mock_test.go on lines 69..72
    hsm/hsm_mock_test.go on lines 114..117
    jwk/manager_mock_test.go on lines 92..95
    jwk/manager_mock_test.go on lines 137..140
    oauth2/oauth2_provider_mock_test.go on lines 89..92
    oauth2/oauth2_provider_mock_test.go on lines 149..152
    oauth2/oauth2_provider_mock_test.go on lines 178..181

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewRevocationRequest(arg0, arg1 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRevocationRequest", reflect.TypeOf((*MockOAuth2Provider)(nil).NewRevocationRequest), arg0, arg1)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 8 other locations - About 45 mins to fix
    hsm/hsm_mock_test.go on lines 54..57
    hsm/hsm_mock_test.go on lines 69..72
    hsm/hsm_mock_test.go on lines 114..117
    jwk/manager_mock_test.go on lines 92..95
    jwk/manager_mock_test.go on lines 137..140
    oauth2/oauth2_provider_mock_test.go on lines 89..92
    oauth2/oauth2_provider_mock_test.go on lines 104..107
    oauth2/oauth2_provider_mock_test.go on lines 149..152

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (mr *MockOAuth2ProviderMockRecorder) NewPushedAuthorizeRequest(arg0, arg1 interface{}) *gomock.Call {
        mr.mock.ctrl.T.Helper()
        return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewPushedAuthorizeRequest", reflect.TypeOf((*MockOAuth2Provider)(nil).NewPushedAuthorizeRequest), arg0, arg1)
    }
    Severity: Major
    Found in oauth2/oauth2_provider_mock_test.go and 8 other locations - About 45 mins to fix
    hsm/hsm_mock_test.go on lines 54..57
    hsm/hsm_mock_test.go on lines 69..72
    hsm/hsm_mock_test.go on lines 114..117
    jwk/manager_mock_test.go on lines 92..95
    jwk/manager_mock_test.go on lines 137..140
    oauth2/oauth2_provider_mock_test.go on lines 89..92
    oauth2/oauth2_provider_mock_test.go on lines 104..107
    oauth2/oauth2_provider_mock_test.go on lines 178..181

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status