horizoncd/horizon

View on GitHub
core/controller/oauth/controller.go

Summary

Maintainability
B
6 hrs
Test Coverage

Showing 2 of 2 total issues

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

func (c *controller) RefreshToken(ctx context.Context,
req *RefreshTokenReq) (*AccessTokenResponse, error) {
accessTokenGenerator, err := c.getAccessTokenGenerator(ctx, req.ClientID)
if err != nil {
return nil, err
Severity: Major
Found in core/controller/oauth/controller.go and 1 other location - About 3 hrs to fix
core/controller/oauth/controller.go on lines 135..161

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

func (c *controller) GenAccessToken(ctx context.Context, req *AccessTokenReq) (*AccessTokenResponse, error) {
accessTokenGenerator, err := c.getAccessTokenGenerator(ctx, req.ClientID)
if err != nil {
return nil, err
}
Severity: Major
Found in core/controller/oauth/controller.go and 1 other location - About 3 hrs to fix
core/controller/oauth/controller.go on lines 163..190
Category
Status