ForestAdmin/forest-rails

View on GitHub
app/services/forest_liana/oidc_configuration_retriever.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
42%
module ForestLiana
  class OidcConfigurationRetriever
    def self.retrieve()
      response = ForestLiana::ForestApiRequester.get('/oidc/.well-known/openid-configuration')
      if response.is_a?(Net::HTTPOK)
        return JSON.parse(response.body)
      else
        raise ForestLiana::MESSAGES[:SERVER_TRANSACTION][:OIDC_CONFIGURATION_RETRIEVAL_FAILED]       
      end
    end
  end
end