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

Server error when sending an access token which is not JWT #54

Open
coudot opened this issue Jun 25, 2021 · 0 comments
Open

Server error when sending an access token which is not JWT #54

coudot opened this issue Jun 25, 2021 · 0 comments

Comments

@coudot
Copy link

coudot commented Jun 25, 2021

I use your plugin with LemonLDAP::NG.

Here is the error I got:

Completed 500 Internal Server Error in 273ms (ActiveRecord: 22.4ms)
  
NoMethodError (undefined method `unpack1' for nil:NilClass):
  
plugins/redmine_openid_connect/app/models/oic_session.rb:178:in `user'
plugins/redmine_openid_connect/app/models/oic_session.rb:163:in `admin?'
plugins/redmine_openid_connect/lib/redmine_openid_connect/account_controller_patch.rb:143:in `oic_local_login'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

This is thrown by this code: https://github.com/devopskube/redmine_openid_connect/blob/master/app/models/oic_session.rb#L178

An access token can be a JWT but it is not mandatory.

I think we should first try id_token to get values, or only tryaccess_token if it is a JWT.

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

No branches or pull requests

1 participant