GetAvailableMembershipProviders

Retorna a lista de todos os Provedores de Autenticação disponíveis no ambiente do CAP.

Disponível no Web Service CAPAuthentication.asmx

Exemplo de Solicitação/Resposta SOAP (v1.2)

POST /Services/CAPAuthentication.asmx HTTP/1.1
Host: dev.capworkflow.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetAvailableMembershipProviders xmlns="http://iteris.cap.webservices" />
  </soap12:Body>
</soap12:Envelope>

---

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetAvailableMembershipProvidersResponse xmlns="http://iteris.cap.webservices">
      <GetAvailableMembershipProvidersResult>
        <MembershipProviderViewModel>
          <Name>string</Name>
          <Description>string</Description>
          <IconUrl>string</IconUrl>
        </MembershipProviderViewModel>
        <MembershipProviderViewModel>
          <Name>string</Name>
          <Description>string</Description>
          <IconUrl>string</IconUrl>
        </MembershipProviderViewModel>
      </GetAvailableMembershipProvidersResult>
    </GetAvailableMembershipProvidersResponse>
  </soap12:Body>
</soap12:Envelope>

Exemplo de Utilização em PowerShell via New-WebServiceProxy

$baseUrl = "https://env.capworkflow.com";
# Cria o proxy para o serviço de autenticação do CAP.
$wsAuth = New-WebServiceProxy -Uri "$baseUrl/Services/CAPAuthentication.asmx" -Namespace "CAP.Services";
# Atribui um Cookie Container ao proxy para armazenar o cookie de autorização a ser retornado.
$wsAuth.CookieContainer = New-Object System.Net.CookieContainer;
# Obtém a lista de provedores disponíveis.
$wsAuth.GetAvailableMembershipProviders();

Exemplo de Utilização em PowerShell via Invoke-WebRequest

$baseUrl = "https://env.capworkflow.com";
# Montagem da mensagem SOAP.
$soapMessage = @"
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetAvailableMembershipProviders xmlns="http://iteris.cap.webservices" />
  </soap12:Body>
</soap12:Envelope>
"@;
# Requisição POST passando a mensagem SOAP e armazenando
# o cookie de autorização na variável de sessão $authSession.
Invoke-WebRequest -Uri "$baseUrl/Services/CAPAuthentication.asmx" -Method Post -ContentType "application/soap+xml; charset=utf-8" -Body $soapMessage -SessionVariable authSession;
Encontrou a sua resposta?