public static ClaimProvider ToModel(this ClaimProviderElement claimProvider) { if (claimProvider == null) { return(null); } return(new ClaimProvider { Identifier = new Uri(claimProvider.Name), Url = new Uri(claimProvider.Uri), Protocol = claimProvider.ProtocolHandler, Parameters = claimProvider.Params.ToModel() }); }
public static ClaimProvider ToModel(this ClaimProviderElement claimProvider) { if (claimProvider == null) { return(null); } return(new ClaimProvider { Identifier = new Uri(claimProvider.Name), DisplayName = claimProvider.DisplayName, Url = claimProvider.Uri.ReplaceWithLocalhostWhenRelative(), Protocol = claimProvider.ProtocolHandler, IdpInitiatedOnly = claimProvider.IdpInitiatedOnly, Parameters = claimProvider.Params.ToModel() }); }