Skip to content

Commit

Permalink
set version to 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Juris Gekiss authored and Juris Gekiss committed Feb 16, 2024
1 parent b48be65 commit 8802dd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
57 changes: 0 additions & 57 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,57 +0,0 @@
1. STS izsaukums

var f = new ChannelFactory<IWSTrust13Contract>(b, e);
f.Credentials.UserName.UserName = "user";
f.Credentials.UserName.Password = "pwd";
// VAI f.Credentials.Certificate.SetCertificate(...);

var serviceProxy = f.CreateChannel();

var rst = new RequestSecurityToken() {
RequestType = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue",
AppliesTo = new EndpointReference("URN:VISSDEV:DIT:WS"),
};

var request = Message.CreateMessage(MessageVersion.Soap12WSAddressing10, "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue", new WSTrustRequestBodyWriter(rst, new WSTrustRequestSerializer(), new WSTrustSerializationContext()));
var result = serviceProxy.ProcessTrust13IssueAsync(request);
var ser = new WSTrustResponseSerializer();
var rstr = ser.ReadXml(result.GetReaderAtBodyContents(), new WSTrustSerializationContext());

2. MyClientCredentials
public override SecurityTokenManager CreateSecurityTokenManager()
{
return new MyClientCredentialsSecurityTokenManager(Clone());
}


MyClientCredentialsSecurityTokenManager
public override SecurityTokenProvider CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement) {
if (tokenRequirement is InitiatorServiceModelSecurityTokenRequirement initiatorRequirement) {
retuen new SimpleSecurityTokenProvider() : SecurityTokenProvider
}
}

public class SimpleSecurityTokenProvider : SecurityTokenProvider {
public SimpleSecurityTokenProvider(SecurityToken token, SecurityTokenRequirement tokenRequirement)
{
if (token == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("token");
}
GenericXmlSecurityToken genericXmlSecurityToken = token as GenericXmlSecurityToken;
if (genericXmlSecurityToken != null)
{
_securityToken = WrapWithAuthPolicy(genericXmlSecurityToken, tokenRequirement);
}
else
{
_securityToken = token;
}
}

protected override SecurityToken GetTokenCore(TimeSpan timeout)
{
return _securityToken;
}

}
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<Company>ABC software</Company>
<Copyright>© ABC software. All rights reserved.</Copyright>
<Product>Abc.IdentityModel</Product>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<Version>2.0.0</Version>
<AssemblyVersion>2.0</AssemblyVersion>
<Version>2.1.0</Version>

<LangVersion>8.0</LangVersion>

Expand Down

0 comments on commit 8802dd7

Please sign in to comment.