Skip to content

Commit a2e17c1

Browse files
committed
allow the gem to pass through org/service/roles info
By adding this, we allow much easier access to these fields - otherwise a client app would have to dig into the "raw_info" hash to find these fields.
1 parent a9fa5dc commit a2e17c1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/omniauth/strategies/radius.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def self.provider_url
3333
"uid",
3434
"confirmed",
3535
"teams",
36+
"organizations",
37+
"services",
38+
"service_roles",
3639
"linked_accounts",
3740
"admin",
3841
"subscription_level",

spec/support/fixtures.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ def self.auth_hash
1414
"email"=>"[email protected]",
1515
"uid"=>1,
1616
"confirmed"=>true,
17+
"organizations"=>[
18+
{"uid"=>1, "name"=>"Radius Networks"},
19+
],
20+
"services"=>[
21+
{"uid"=>1, "slug"=>"pickup", "name"=>"FlyBuy Pickup"},
22+
],
23+
"service_roles"=>[
24+
{"uid"=>1, "role"=>"owner", "team_id"=>1, "service_id"=>1, "organization_id"=>1},
25+
],
1726
"teams"=>[
1827
{"id"=>1, "name"=>"Radius Networks", "uid"=>1},
1928
{"id"=>2, "name"=>"TARDIS", "uid"=>2}

0 commit comments

Comments
 (0)