class ADAL::MexRequest

A request to a Metadata Exchange endpoint of an ADFS server. Used to obtain the WSTrust endpoint for username and password authentication of federated users.

Public Class Methods

new(endpoint) click to toggle source

Constructs a MexRequest object for a specific URL endpoint.

@param String|URI endpoint

The Metadata Exchange endpoint.
# File lib/adal/mex_request.rb, line 41
def initialize(endpoint)
  @endpoint = URI.parse(endpoint.to_s)
end

Public Instance Methods

execute() click to toggle source

@return MexResponse

# File lib/adal/mex_request.rb, line 46
def execute
  request = Net::HTTP::Get.new(@endpoint.path)
  request.add_field('Content-Type', 'application/soap+xml')
  MexResponse.parse(http(@endpoint).request(request).body)
end