defining your own identity server #3754
Replies: 3 comments 4 replies
-
@AhsanSpica - can you please provide details on what you are trying to seek help on or would like to discuss with us about? |
Beta Was this translation helpful? Give feedback.
-
@AhsanSpica - Can you please provide information on the use case? There are details on how, we would like to understand the scenario and why you need your own IDP vs EntraID. Curious to know if this is a production use case. |
Beta Was this translation helpful? Give feedback.
-
@AhsanSpica - please look into the below documentation to help setup auth using EntralD Let us know if you have any additional questions and will be happy to help. |
Beta Was this translation helpful? Give feedback.
-
defining your own identityserver and your own dbstore
resulting in succesfully finding client in db but filing authetnicoation and cause given invalid client
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.Build();
var secretConfig = new ConfigurationBuilder()
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("secrets.json", optional: true, reloadOnChange: true)
.Build();
// .AddTestUsers(new List
// {
// new TestUser
// {
// Username = "Tulaib.Siddiqui",
// Password = "!Harbinger2024",
// IsActive = true,
// SubjectId = "testuser",
// Claims = new List<System.Security.Claims.Claim>
// {
// new System.Security.Claims.Claim("roles", "FHIRClaim"),
// new System.Security.Claims.Claim("FhirUser", "https://localhost:44348/Patient/testuser"),
// },
// },
// })
// .AddInMemoryClients(new List<IdentityServer4.Models.Client>
// {
// new IdentityServer4.Models.Client
// {
// ClientId = clientId,
// ClientSecrets = { new IdentityServer4.Models.Secret(clientSecret.Sha256()) },
// AllowedGrantTypes = new List { "client_credentials", "password" },
// AllowedScopes = new[] { DevelopmentIdentityProviderConfiguration.Audience, WrongAudienceClient, "fhirUser" }.Concat(smartScopes.Select(s => s.Name)).ToList(),
// Claims = new List<IdentityServer4.Models.ClientClaim>
// {
// new IdentityServer4.Models.ClientClaim("roles", "FHIRClaim"),
// }.Concat(CreateFhirUserClaims(clientId, "https://localhost:44348/")).ToList(),
// ClientClaimsPrefix = string.Empty,
// },
// })
{
private readonly PersistedGrantSQLDbContext _dbContext;
private readonly ILogger _logger;
{
new IdentityServer4.EntityFramework.Entities.Client
{
ClientId = clientId,
ClientSecrets = new List<IdentityServer4.EntityFramework.Entities.ClientSecret> { clientSecret1 },
AllowedGrantTypes = new List<IdentityServer4.EntityFramework.Entities.ClientGrantType>
{
new IdentityServer4.EntityFramework.Entities.ClientGrantType { GrantType = "client_credentials" },
new IdentityServer4.EntityFramework.Entities.ClientGrantType { GrantType = "password" },
},
AllowedScopes = new List<IdentityServer4.EntityFramework.Entities.ClientScope>
{
new IdentityServer4.EntityFramework.Entities.ClientScope { Scope = DevelopmentIdentityProviderConfiguration.Audience },
new IdentityServer4.EntityFramework.Entities.ClientScope { Scope = WrongAudienceClient },
new IdentityServer4.EntityFramework.Entities.ClientScope { Scope = "fhirUser" },
};
Beta Was this translation helpful? Give feedback.
All reactions