private GenericXmlSecurityKeyIdentifierClause GetSecurityKeyIdentifierForTokenReference(SecurityTokenReference securityTokenReference) { if (securityTokenReference == null) { return(null); } return(new GenericXmlSecurityKeyIdentifierClause(WsSecuritySerializer.CreateXmlElement(securityTokenReference))); }
private GenericXmlSecurityKeyIdentifierClause GetSecurityKeyIdentifierForTokenReference(SecurityTokenReference securityTokenReference) { if (securityTokenReference == null) { return(null); } // this is tricky. // the SecurityTokenReference must be in the wsse namespace of the security binding that will communicate with the relying party. // the 'TokenType must be in wsse 1.1 // TODO - need to create to obtain the actual security version that will be used for the relying party. // even though the MessageSecurityVersion is 1.1, the security header is written with 1.0 return(new GenericXmlSecurityKeyIdentifierClause(WsSecuritySerializer.GetXmlElement(securityTokenReference, new WsSerializationContext(WsTrustVersion.TrustFeb2005)))); }