public static ResourceOwnerProfile Copy(this ResourceOwnerProfile profile)
 {
     return(new ResourceOwnerProfile
     {
         CreateDateTime = profile.CreateDateTime,
         Issuer = profile.Issuer,
         ResourceOwnerId = profile.ResourceOwnerId,
         Subject = profile.Subject,
         UpdateTime = profile.UpdateTime
     });
 }
Example #2
0
        public static ProfileResponse ToDto(this ResourceOwnerProfile profile)
        {
            if (profile == null)
            {
                throw new ArgumentNullException(nameof(profile));
            }

            return(new ProfileResponse
            {
                Issuer = profile.Issuer,
                UserId = profile.Subject,
                CreateDateTime = profile.CreateDateTime,
                UpdateTime = profile.UpdateTime
            });
        }