Comments (2)
Good suggestion, I'll look into this.
from aspnetcore.identity.documentdb.
@nemesis1203 I thought about this and came to the conclusion that I don't want to have the FullName as a default. It has to be an indexed field and thus can cause a lot of storage overhead if you don't need the FullName, which will be the case in most scenarios I assume. Also I would break current implementations, which would be OK considering the Beta status of the NuGet package, but still, if you can avoid this ...
The other possibility was to make it configurable, but that would be hard and intransparent/hacky the way it could be done (considering creating the User and Role instances is not in the control of the persistence provider).
So what I actually would suggest if you need this is to simply create your own User and Role classes and inherit from DocumentDbIdentityUser
and DocumentDbIdentityRole
and overwrite the DocumentType
property:
public class MyCustomUser : DocumentDbIdentityUser<DocumentDbIdentityRole>
{
public override string DocumentType
{
get
{
return this.GetType().FullName;
}
}
}
I think that would be the cleanest way to solve your requirement. Do you agree?
from aspnetcore.identity.documentdb.
Related Issues (20)
- Has anyone got this running in a web api project? HOT 1
- Not able to compile samples in Visual Studio for Mac HOT 1
- remove claim does not work HOT 3
- AspNetCore 2.0 HOT 8
- Error running application after upgrade to core 2.0 HOT 5
- deserializing claims
- Unable to log back in after creating a user, null as part of the Claims Process
- Take document db collection name as parameter HOT 1
- Claims cannot be deserialized HOT 3
- ObjectDisposedException HOT 1
- Missing method exception after upgrading to SDK 2.1.3
- Question - How are the document updated? HOT 1
- TypeLoadException: Method 'NormalizeName' in type 'LookupNormalizer' does not have an implementation HOT 5
- SSL should be enabled in the sample
- AddDefaultDocumentClientForIdentity is missing from NuGet package HOT 3
- Is it considered to change dependency to Microsoft.Azure.Cosmos?
- Use IDocumentClient instead of DocumentClient HOT 1
- Subclass Userstore to allow using it without any RoleStore
- Adding samples how to use and manage Roles HOT 1
- Getting exception BadRequestException: Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetcore.identity.documentdb.