diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/services/jwt/container_registry_authentication_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/jwt/container_registry_authentication_service.rb b/app/services/jwt/container_registry_authentication_service.rb index 2edee1f0ab0..bc7e663caa6 100644 --- a/app/services/jwt/container_registry_authentication_service.rb +++ b/app/services/jwt/container_registry_authentication_service.rb @@ -1,4 +1,4 @@ -module Jwt +module JWT class ContainerRegistryAuthenticationService < BaseService AUDIENCE = 'container_registry' @@ -7,7 +7,7 @@ module Jwt return error('forbidden', 403) unless current_user end - return error('forbidden', 401) if scopes.empty? + return error('forbidden', 401) if scopes.blank? { token: authorized_token(scopes).encoded } end @@ -26,7 +26,7 @@ module Jwt private def authorized_token(access) - token = ::Jwt::RSAToken.new(registry.key) + token = ::JWT::RSAToken.new(registry.key) token.issuer = registry.issuer token.audience = AUDIENCE token.subject = current_user.try(:username) |