Thursday 7 August 2014

WSO2 STS RequestSecurityToken Example

      <wsse:Security soap:mustUnderstand="true">
         <wsu:Timestamp wsu:Id="Timestamp-62">
            <wsu:Created>2014-07-22T08:34:17Z</wsu:Created>
            <wsu:Expires>2014-07-22T08:34:18Z</wsu:Expires>
         </wsu:Timestamp>
         <wsse:UsernameToken wsu:Id="UsernameToken-61">
            <wsse:Username>admin</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</wsse:Password>
            <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">4TFLJ3AAewWtCkolCRvYbQ==</wsse:Nonce>
            <wsu:Created>2014-07-22T08:34:17.806Z</wsu:Created>
         </wsse:UsernameToken>
      </wsse:Security>
      <wsa:MessageID>uuid:d54cb478-fdd1-4495-84df-2fde515a4591</wsa:MessageID>
      <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</wsa:Action>
   </soap:Header>
   <soap:Body>
      <wst:RequestSecurityToken>
         <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>
         <wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</wst:TokenType>
         <wst:KeyType>http://schemas.xmlsoap.org/ws/2005/02/trust/Bearer</wst:KeyType>
         <wst:Claims wsp:Dialect="http://wso2.org" xmlns:wsp="http://schemas.xmlsoap.org/ws/2005/02/trust">
            <wsid:ClaimType Uri="http://wso2.org/claims/givenname"/>
            <wsid:ClaimType Uri="http://wso2.org/claims/emailaddress"/>
         </wst:Claims>
      </wst:RequestSecurityToken>
   </soap:Body>
</soap:Envelope>