Esempio n. 1
0
        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()
            });
        }
Esempio n. 2
0
        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()
            });
        }