简体   繁体   English

WSO2 AuthenticationAdmin注销

[英]WSO2 AuthenticationAdmin Logout

I am working with version 4.1.0 of the WSO2 Identity Server. 我正在使用WSO2 Identity Server的4.1.0版本。 I have used the WSO2 AuthenticationAdmin services (localhost:9443/services/AuthenticationAdmin) to login, check authenticator, etc. There is also an operation for 'logout'. 我已经使用WSO2 AuthenticationAdmin服务(localhost:9443 / services / AuthenticationAdmin)登录,检查身份验证器等。还有一个用于“注销”的操作。

When soapUI generates the logout request, it does not contain any noteworthy elements, as is confirmed by the schema (xsd) with the namespace http://authentication.services.core.carbon.wso2.org . 当soapUI生成注销请求时,它不包含任何值得注意的元素,正如具有名称空间http://authentication.services.core.carbon.wso2.org的架构(xsd)所确认的那样。 The SOAP request body is as follows. SOAP请求主体如下。

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:aut="http://authentication.services.core.carbon.wso2.org">
 <soap:Header/>
   <soap:Body>
     <aut:logout/>
 </soap:Body>
</soap:Envelope>

When sending a request, the RAW response is as follows. 发送请求时,RAW响应如下。

HTTP/1.1 202 Accepted
Date: Wed, 26 Jun 2013 08:29:48 GMT
Server: WSO2 Carbon Server
Content-Type: text/xml;charset=UTF-8
Set-Cookie: JSESSIONID=94784CC9FC03E9FA3822CFDDAD0D36F6; Path=/; Secure; HttpOnly
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked

First of all, do I think there is no SOAP message in the response. 首先,我是否认为响应中没有SOAP消息。 Also, the HTTP status is 202, which means that the request is accepted for processing, but the processing has not yet been completed. 同样,HTTP状态为202,这表示请求已接受处理,但处理尚未完成。

How do I logout with this service? 如何注销该服务?

What elements should be added to the < aut:logout > ? 哪些元素应添加到<aut:logout>?

Should a JSESSIONID be added to the header of the request? 是否应将JSESSIONID添加到请求的标头?

How can this logout be combined with the loginWithRememberMeOption ? 如何将此注销与loginWithRememberMeOption结合使用?

------- UPDATE After reviewing the xsd I saw that a wsa:action must be added to the SOAP Header. -------更新在检查了xsd之后,我发现必须将wsa:action添加到SOAP Header中。 After doing this, I received the following reply. 完成此操作后,我收到以下答复。 This reply asks for a MessageID. 此答复要求一个MessageID。 But I am not sure what this value should be. 但是我不确定这个值应该是多少。

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:Action>http://www.w3.org/2005/08/addressing/fault</wsa:Action>
   </soapenv:Header>
   <soapenv:Body>
      <soapenv:Fault>
         <soapenv:Code>
            <soapenv:Value>soapenv:Sender</soapenv:Value>
            <soapenv:Subcode>
               <soapenv:Value xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageAddressingHeaderRequired</soapenv:Value>
            </soapenv:Subcode>
         </soapenv:Code>
         <soapenv:Reason>
            <soapenv:Text xml:lang="en-US">A required header representing a Message Addressing Property is not present</soapenv:Text>
         </soapenv:Reason>
         <soapenv:Detail>
            <wsa:ProblemHeaderQName xmlns:wsa="http://www.w3.org/2005/08/addressing">wsa:MessageID</wsa:ProblemHeaderQName>
         </soapenv:Detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

When adding a generated MessageID, the is once again an empty SOAP reply with a HTTP 202 status. 添加生成的MessageID时,它再次是具有HTTP 202状态的空SOAP答复。

The logout method just invalidates the session. 注销方法只是使会话无效。

You just call the logout operation as it is from the soapUI. 您只需要从soapUI调用注销操作即可。 There are no parameters to it. 没有参数。

If you look at the AuthenticationAdmin WSDL, you can see that there is no output for logout operation. 如果查看AuthenticationAdmin WSDL,可以看到没有用于注销操作的输出。 That's why you get HTTP 202 status code. 这就是为什么您获得HTTP 202状态代码的原因。

You can view the WSDL by changing <HideAdminServiceWSDLs> configuration to false in carbon.xml (/repository/conf/carbon.xml) 您可以通过在carbon.xml(/repository/conf/carbon.xml)中将<HideAdminServiceWSDLs>配置更改为false来查看WSDL。

<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>

Type following in your browser to view the WSDL. 在浏览器中键入以下命令以查看WSDL。

https://:9443/services/AuthenticationAdmin?wsdl https://:9443 / services / AuthenticationAdmin?wsdl

I hope this helps! 我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM