File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,4 +347,7 @@ group :development do
347347
348348 # TomDoc for YARD (http://rubyworks.github.com/yard-tomdoc)
349349 gem 'yard-tomdoc'
350+
351+ # IDP testing
352+ gem 'rack-cors'
350353end
Original file line number Diff line number Diff line change 1+ # Be sure to restart your server when you modify this file.
2+
3+ # Avoid CORS issues when API is called from the frontend app.
4+ # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
5+
6+ # Read more: https://github.com/cyu/rack-cors
7+
8+ Rails . application . config . middleware . insert_before 0 , Rack ::Cors do
9+ allow do
10+ origins 'localhost:8080'
11+
12+ resource '*' ,
13+ headers : :any ,
14+ methods : %i[ get post put patch delete options head ] ,
15+ credentials : true
16+ end
17+ end
Original file line number Diff line number Diff line change 259259
260260 # Any entries here MUST match a corresponding entry in the identifier_schemes table as
261261 # well as an identifier_schemes.schemes section in each locale file!
262- OmniAuth . config . full_host = 'https ://my_service.hostname '
262+ OmniAuth . config . full_host = 'http ://localhost:3000 '
263263 OmniAuth . config . allowed_request_methods = [ :post ]
264264
265265 config . omniauth :orcid ,
270270
271271 config . omniauth :shibboleth ,
272272 {
273- # debug: true,
274- # uid_field: "HTTP_REMOTE_USER",
275- # shib_application_id_field: "HTTP_SHIB_APPLICATION_ID",
276- # shib_session_id_field: "HTTP_SHIB_SESSION_ID",
273+ uid_field : "HTTP_REMOTE_USER" ,
274+ shib_application_id_field : "HTTP_SHIB_APPLICATION_ID" ,
275+ shib_session_id_field : "HTTP_SHIB_SESSION_ID" ,
277276 fields : [ ] ,
278277 info_fields : {
279- # affiliation: "HTTP_AFFILIATION",
278+ email : "HTTP_MAIL" ,
279+ name : "HTTP_DISPLAYNAME"
280+ # Add other attributes you need
280281 } ,
281282 extra_fields : [ ]
282283 }
You can’t perform that action at this time.
0 commit comments