Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-12 20:47:55 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-12 20:47:55 +0300
commitfc2d985bfaa156ad052858cd2025b0300327ff95 (patch)
treef963aba43eaac8dd6069b76f900757ed0a1e76b5 /app
parentc78b97df0eb275415d6ed5ef297841ee2f61b473 (diff)
Fix CI tests
Diffstat (limited to 'app')
-rw-r--r--app/controllers/jwt_controller.rb2
-rw-r--r--app/services/jwt/container_registry_authentication_service.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/jwt_controller.rb b/app/controllers/jwt_controller.rb
index 0048a1a31ea..599f62bd121 100644
--- a/app/controllers/jwt_controller.rb
+++ b/app/controllers/jwt_controller.rb
@@ -3,7 +3,7 @@ class JwtController < ApplicationController
skip_before_action :verify_authenticity_token
SERVICES = {
- 'container_registry' => Jwt::ContainerRegistryAuthenticationService,
+ 'container_registry' => JWT::ContainerRegistryAuthenticationService,
}
def auth
diff --git a/app/services/jwt/container_registry_authentication_service.rb b/app/services/jwt/container_registry_authentication_service.rb
index b9fcd380475..0ab3e6d02ba 100644
--- a/app/services/jwt/container_registry_authentication_service.rb
+++ b/app/services/jwt/container_registry_authentication_service.rb
@@ -1,11 +1,11 @@
-module Jwt
+module JWT
class ContainerRegistryAuthenticationService < BaseService
def execute
if params[:offline_token]
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
@@ -13,7 +13,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 = params[:service]
token.subject = current_user.try(:username)