Update preview samples to IdentityServer 8.1.0-preview.4 and show multiple storage instances - #384
Open
Erwinvandervalk wants to merge 3 commits into
Open
Erwinvandervalk wants to merge 3 commits into
Erwinvandervalk wants to merge 3 commits into
Conversation
…agement 2.0.0-preview.3 Migrate Storage, AccountLockout and Spaces to the new storage registration APIs (AddStorage + AddConfigurationStorage/AddOperationalStorage, IStorageInstanceSchema, SchemaId.OidcIdentityProvider). Lengthen the Spaces demo password to meet the new 15-character minimum.
Store configuration and operational data in separate named storage instances and migrate each one separately.
… sample Replace the copied OIDC provider schema with DefaultOidcProviderSchema, and extend BuiltInSchemas.UserProfile with the username attribute instead of redefining email. The built-in email is required and unique, so seeded users get an email and external users without one get a per-user placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the preview samples to the newly released packages and adds a demo of multiple storage instances.
Package updates
IdentityServer/v8/StorageIdentityServer/v8/UserManagement/AccountLockoutIdentityServer/v8/SpacesAPI migrations
AddSqliteInMemoryStore(...)is replaced byAddSqliteInMemory(...)/AddSqlite(...).AddStorage(...)now only registers a database. The Storage and Spaces samples callAddConfigurationStorage()andAddOperationalStorage()to keep IdentityServer data in it.AddSqliteStore(...). AccountLockout registers the database withAddStorage(...)on the IdentityServer builder; the database file stays in the same place.AddDynamicSchemas()because its schema bootstrapper usesISchemaAdmin.IDatabaseSchemais replaced byIStorageInstanceSchema.SchemaId.IdentityProvider("oidc")is replaced bySchemaId.OidcIdentityProvider.Pa$$Word123456789(seed data, development settings, README and Playwright tests).DefaultOidcProviderSchemafor the OIDC identity provider, andBuiltInSchemas.UserProfile.Extend(DemoUserAttributes.UserName)for user profiles (email, name, given_name and family_name are built in). The built-inemailis required and unique, so seeded users get<username>@example.com, and external users without an email claim get a per-user placeholder instead of the sharedtest@test.nl.Multiple storage instances
The Storage sample now keeps IdentityServer configuration data and operational data in two separate named storage instances, and migrates each one separately:
The home page shows which instance holds which data, and the README has a new "Multiple storage instances" section.
Verification
eu-westand fails withus-east. Signing in as alice with authorization code + PKCE creates a server-side session, which/sample/sessionslists;/sample/clientsreturns the stored clients.dotnet run, becausedotnet testdoesn't support Microsoft.Testing.Platform on the .NET 10 SDK).