/// <summary> /// Executes the workflow to do user authentication renewal. /// </summary> /// <param name="request">The request.</param> /// <returns>The response.</returns> protected override UserAuthenticationRenewalResponse Process(UserAuthenticationRenewalRequest request) { ThrowIf.Null(request, "request"); Device device = null; // If device Id is present, authenticate the device to check if the device is active. if (!string.IsNullOrWhiteSpace(this.Context.GetPrincipal().DeviceNumber)) { device = AuthenticationHelper.AuthenticateDevice(this.Context, this.Context.GetPrincipal().DeviceToken); } // Send authentication renewal request to the service. Employee employee = AuthenticationHelper.AuthenticateRenewalUser(this.Context, device); CommerceIdentity identity = new CommerceIdentity(employee, device) { // Add the LogOn Configuration to the claim. LogOnConfiguration = this.Context.GetPrincipal().LogOnConfiguration }; return(new UserAuthenticationRenewalResponse(employee, device, identity)); }