...
Interface
IUserManager
Syntax
await _userManagerUserManager.Add(User user)
Returns
Task<User>
...
On authorization error, 403 Forbidden
Example
Code Block | ||
---|---|---|
| ||
var user = new User { FirstName = "John", LastName = "Doe", AuthenticationContext = new AuthenticationContext { GCKey = new GCKey { MBUN = Guid.NewGuid().ToString(), Issuer = MTOAConstants.GCKeyDefaultIssuer, }, Type = AuthenticationType.GCKey } }; var phoneCoordinate = new PhoneCoordinate { LocalNumber = Rand.Next(2000000, 9999999).ToString("D7"), AreaCode = "613", CountryCode = "1", IsPrimary = true, PhoneType = PhoneType.Landline, LocationType = CoordinateLocationType.Business }; var emailCoordinate = new EmailCoordinate { LocationType = CoordinateLocationType.Business, IsPrimary = true, EmailAddress = "domain@domain.com" }; var mailCoordinate = new MailCoordinate { LocationType = CoordinateLocationType.Individual, CoordinateType = CoordinateType.Mail, StreetName = "300 Sparks Street", PostalZipCode = "K1R7S3", CountryCode = 124, CountrySubdivisionCode = "ON", CityTownName = "OTTAWA" }; user.Coordinates.Add(phoneCoordinate); user.Coordinates.Add(emailCoordinate); user.Coordinates.Add(mailCoordinate); await _userManager.Add(user); |
...