private ApplicationServiceDescriptor GetApplicationDescriptor(string wsfedEndpoint) { var tokenService = new ApplicationServiceDescriptor(); tokenService.ServiceDescription = _options.SiteName; tokenService.Keys.Add(GetEncryptionDescriptor()); tokenService.Keys.Add(GetSigningKeyDescriptor()); tokenService.PassiveRequestorEndpoints.Add(new EndpointReference(wsfedEndpoint)); tokenService.Endpoints.Add(new EndpointReference(wsfedEndpoint)); tokenService.TokenTypesOffered.Add(new Uri(TokenTypes.OasisWssSaml11TokenProfile11)); tokenService.TokenTypesOffered.Add(new Uri(TokenTypes.OasisWssSaml2TokenProfile11)); tokenService.TokenTypesOffered.Add(new Uri(TokenTypes.JsonWebToken)); tokenService.ProtocolsSupported.Add(new Uri("http://docs.oasis-open.org/wsfed/federation/200706")); return tokenService; }
private ApplicationServiceDescriptor GetLdapApplicationServiceDescriptor() { var appDescriptor = new ApplicationServiceDescriptor(); appDescriptor.ServiceDescription = ConfigurationRepository.Global.SiteName; appDescriptor.Keys.Add(GetSigningKeyDescriptor()); appDescriptor.PassiveRequestorEndpoints.Add(new EndpointReference(_endpoints.LdapSignInUri.AbsoluteUri)); appDescriptor.TokenTypesOffered.Add(new Uri(TokenTypes.OasisWssSaml11TokenProfile11)); appDescriptor.TokenTypesOffered.Add(new Uri(TokenTypes.OasisWssSaml2TokenProfile11)); ClaimsRepository.GetSupportedClaimTypes() .ToList() .ForEach(claimType => appDescriptor.ClaimTypesOffered.Add(new DisplayClaim(claimType))); appDescriptor.ProtocolsSupported.Add(new Uri("http://docs.oasis-open.org/wsfed/federation/200706")); return appDescriptor; }