All these examples are based on the following;
- asp.net 2.1 WebApp
- asp.net identity
- Neo4J desktop
The User Database - PagesWebApp.AspNetCoreNeo4j
The Federated Gateway - PagesWebApp.AspNetCoreNeo4j.Support
The External Support IDP
"neo4JConnectionConfiguration": {
"connectionString": "bolt://127.0.0.1:7687",
"userName": "neo4j",
"password": "password"
}
Make sure you create a project in Neo4j using the above settings. The following projects require Neo4J;
PagesWebApp.AspNetCoreNeo4j
PagesWebApp.AspNetCoreNeo4j.Support
PagesWebApp
This Federated Gateway is using the out-of-the-box framework provided by Microsoft.
PagesWebApp.AspNetCoreNeo4j
This Federated Gateway is using Neo4j as its user store. It also points to our Support IDP as an external IDP.
PagesWebApp.AspNetCoreNeo4j.Support
This IDP shares the same Neo4j user database as PagesWebApp.AspNetCoreNeo4j. The support IDP is used by a support agent to ask many factor questions which results in a login. The Support idp is recorded in the id_token so that the final clients know the difference between a user login vs on that was done over the phone.
Don't forget to add many factors to a user using the Federated Gateway PagesWebApp.AspNetCoreNeo4j;
PagesWebAppClient
This is a full on asp.net 2.1 Identity app, which has its own user database. This is what you would typically see pointing to Google, Twitter, and our own OIDC PagesWebApp
PagesWebAppClient-NoUserDatabase
This is still using asp.net 2.1 Identity, however the user database is in-memory. A little trick I do is during the ExternalLogin Callback I create the user, sign them in, and then promptly delete the user. I have found out that in the case of using an external system as my user database, that there is no need to call any UserManager stuff. This one only points to our single OIDC PagesWebApp
learnrazorpages
IdentityServer4.AspNetIdentity
asp.net core 2.1
AspNetCore.Identity.Neo4j