File tree Expand file tree Collapse file tree
spec/controllers/concerns Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FRAMEWORK_ALMA_API_URL = https://api-na.hosted.exlibrisgroup.com/almaws/v1/
1+ # If pointing to the sandbox the env=sandbox is required in the url
2+ ALMA_JWT_JWKS_URL = https://api-na.hosted.exlibrisgroup.com/auth/our institution code/jwks.json?env=sandbox
23# Keys can be found in LastPass
34FRAMEWORK_ALMA_API_KEY = KEY_GOES_HERE
5+ FRAMEWORK_ALMA_API_URL = https://api-na.hosted.exlibrisgroup.com/almaws/v1/
46FRAMEWORK_ALMA_SANDBOX_KEY = KEY_GOES_HERE
5- LIT_TIND_API_KEY = KEY_GOES_HERE
7+ LIT_TIND_API_KEY = KEY_GOES_HERE
Original file line number Diff line number Diff line change 33require 'json'
44
55module AlmaJwtValidator
6- JWKS_URL = 'https://api-na.hosted.exlibrisgroup.com/auth/01UCS_BER/jwks.json' . freeze
6+ # https://developers.exlibrisgroup.com/alma/integrations/token/
7+ # If running against the Alma sandbox the JWKS_URL needs env=sandbox appended to the end of the url
8+ # e.g. https://api-na.hosted.exlibrisgroup.com/auth/01UCS_BER/jwks.json?env=sandbox.
9+ # set ALMA_JWT_JWKS_URL in your .env when running locally against the Alma sandbox
10+ JWKS_URL = ENV . fetch ( 'ALMA_JWT_JWKS_URL' , 'https://api-na.hosted.exlibrisgroup.com/auth/01UCS_BER/jwks.json' ) . freeze
711 EXPECTED_ISS = 'Prima' . freeze
812
913 module_function
Original file line number Diff line number Diff line change 55
66describe AlmaJwtValidator do
77 let ( :alma_institution_code ) { '01UCS_BER' }
8- let ( :jwks_url ) { "https://api-na.hosted.exlibrisgroup.com/auth/#{ alma_institution_code } /jwks.json" }
8+ let ( :jwks_url ) { ENV . fetch ( 'ALMA_JWT_JWKS_URL' , "https://api-na.hosted.exlibrisgroup.com/auth/#{ alma_institution_code } /jwks.json" ) }
99 let ( :expected_iss ) { 'Prima' }
1010
1111 # Generate an EC key pair for testing
You can’t perform that action at this time.
0 commit comments