Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization, permissions, hub mutation #110

Merged
merged 38 commits into from
Jan 17, 2019

Conversation

brianpeiris
Copy link
Contributor

@brianpeiris brianpeiris commented Jan 16, 2019

Includes #108 and #107

brianpeiris and others added 30 commits November 8, 2018 19:53
use Guardian, otp_app: :ret

def subject_for_token(_resource, %{"account_id" => account_id, "hub_id" => hub_id}) do
{:ok, "#{account_id |> to_string}_#{hub_id}"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this to_string necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nope


hub = socket |> hub_for_socket

account_id =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also be factored account_id = if account do account.account_id else nil end

@gfodor
Copy link
Contributor

gfodor commented Jan 16, 2019

lgtm! nice work!

@brianpeiris brianpeiris changed the title Feature/authed hub mutation Authorization, permissions, hub mutation Jan 17, 2019
@brianpeiris brianpeiris changed the base branch from other/auth-mutation-merge to master January 17, 2019 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants