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

Make uid label configurable #11

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

iconoeugen
Copy link
Contributor

The uid is always using the sub value from the userinfo, which in some applications is not the expected value.

To avoid such limitations, the uid label is now configurable by providing the omniauth uid_label option to a different label (i.e. preferred_username) that appears in the userinfo details.

The default value for uid_label is set to sub to ensure the backward compatibility is not broken.

@iconoeugen iconoeugen force-pushed the feature/configurable_uid_label branch from a33cda6 to 6d08609 Compare February 7, 2019 16:53
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
test/lib/omniauth/strategies/openid_connect_test.rb Outdated Show resolved Hide resolved
@iconoeugen iconoeugen force-pushed the feature/configurable_uid_label branch from 6d08609 to 2f73c9e Compare February 7, 2019 17:06
@iconoeugen iconoeugen force-pushed the feature/configurable_uid_label branch 2 times, most recently from 25c7846 to 19ce2cc Compare February 7, 2019 22:50
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
lib/omniauth/strategies/openid_connect.rb Outdated Show resolved Hide resolved
lib/omniauth/strategies/openid_connect.rb Show resolved Hide resolved
@iconoeugen iconoeugen force-pushed the feature/configurable_uid_label branch from 19ce2cc to 53d1511 Compare February 7, 2019 23:02
@iconoeugen iconoeugen force-pushed the feature/configurable_uid_label branch from 53d1511 to 2bbcaef Compare February 17, 2019 11:22
@m0n9oose m0n9oose merged commit 471c0bc into omniauth:master Feb 25, 2019
bcarr092 referenced this pull request in Zetatango/omniauth_openid_connect Mar 8, 2019
* upgrade openid_connect dependency

* fix mocha deprecation warning

* tweak travis settings

* Fix tests, update some dependencies

* Fix warnings

* Allows ui_locales, claims_locales and login_hint as request params

Ref:
[http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)
These params are allowed to be used during Authentication request.

* forward `params` call to `request.params`

* RP-Initiated Logout phase (#5)

* Add logout phase

* Avoid to make a discover for each other_phase call

* avoid using match when MatchData is not used

* Make uid label configurable (#11)

* add partner option

* fix: Gracefully handle state mismatch (#6)
miguelakira referenced this pull request in Zetatango/omniauth_openid_connect May 8, 2019
* upgrade openid_connect dependency

* fix mocha deprecation warning

* tweak travis settings

* Fix tests, update some dependencies

* Fix warnings

* Allows ui_locales, claims_locales and login_hint as request params

Ref:
[http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)
These params are allowed to be used during Authentication request.

* forward `params` call to `request.params`

* RP-Initiated Logout phase (#5)

* Add logout phase

* Avoid to make a discover for each other_phase call

* avoid using match when MatchData is not used

* Make uid label configurable (#11)

* add partner option

* fix: Gracefully handle state mismatch (#6)
miguelakira referenced this pull request in Zetatango/omniauth_openid_connect May 8, 2019
miguelakira referenced this pull request in Zetatango/omniauth_openid_connect May 8, 2019
* upgrade openid_connect dependency

* fix mocha deprecation warning

* tweak travis settings

* Fix tests, update some dependencies

* Fix warnings

* Allows ui_locales, claims_locales and login_hint as request params

Ref:
[http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest](http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest)
These params are allowed to be used during Authentication request.

* forward `params` call to `request.params`

* RP-Initiated Logout phase (#5)

* Add logout phase

* Avoid to make a discover for each other_phase call

* avoid using match when MatchData is not used

* Make uid label configurable (#11)

* add partner option

* fix: Gracefully handle state mismatch (#6)
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