Skip to content

Commit

Permalink
Merge pull request #9 from aried3r/patch-1
Browse files Browse the repository at this point in the history
Update 2017-05-policy-object.md
  • Loading branch information
equivalent committed May 18, 2017
2 parents 4ec8832 + f9647ba commit cd9b476
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions archive/blogs/2017-05-policy-object.md
Expand Up @@ -64,7 +64,6 @@ class ClientsController < ApplicationController
before_filter :authenticate_user! # Devise check if current user is sign_in or not (is he/she authenticated)
before_filter :set_client


def show
end

Expand Down Expand Up @@ -533,7 +532,7 @@ class ClientPolicy
# ...
def public_client_ids
Rails.cache.fetch('client_policy_public_clients', expires_in: 10.minutes) do
body = HTTParty.get('http://my-micro-service.com/api/v1/public_cliets.json')
body = HTTParty.get('http://my-micro-service.com/api/v1/public_clients.json')
JSON.parse(body)
end
end
Expand All @@ -560,7 +559,7 @@ class CurrentUser < ApplicationController
def index
roles = {}
roles.merge!(client_policy_json) if client
reles.merge!(some_other_roles)
roles.merge!(some_other_roles)
render json: roles
end

Expand Down

0 comments on commit cd9b476

Please sign in to comment.