Ruby
RubyidentraVerify access tokens locally (EdDSA via JWKS) and call the API; ships Rack/Rails middleware.
Install
gem install identraVerify a token
ruby
require "identra"
identra = Identra::Client.new(
api_url: "http://localhost:8080",
application_id: APP_ID,
api_key: API_KEY, # optional; only for API calls
)
begin
claims = identra.verify_token(authorization_header)
claims.sub # user id
claims.sid # revocable session id
claims.aal # assurance level
claims.org # active organization id, if any
rescue Identra::Error
# respond 401
endAPI
Identra::Client.newverify_tokenIdentra::Error