public UsernameToken(UsernameInfo usernameInfo, string nonce, string created) { if (usernameInfo == null) { throw new ArgumentNullException("usernameInfo"); } _usernameInfo = usernameInfo; if (nonce != null) { _nonce = Convert.FromBase64String(nonce); } if (created != null) { _created = DateTime.Parse(created); } // the user name token is not capable of any crypto _securityKeys = new ReadOnlyCollection <SecurityKey>(new List <SecurityKey>()); }
/// <summary> /// UsernameToken that allows for time offset corrections in case device time and client time /// aren't synchronized. /// </summary> /// <param name="usernameInfo"></param> /// <param name="DeviceTimeOffset">Difference between device UTC time and client UTC time in seconds</param> public UsernameToken(UsernameInfo usernameInfo, double DeviceTimeOffset) : this(usernameInfo, null, null) { _created = DateTime.UtcNow + TimeSpan.FromSeconds(DeviceTimeOffset); }
public UsernameToken(UsernameInfo usernameInfo) : this(usernameInfo, null, null) { }