سؤال

What is authentication mechanism for ravendb in server mode. The Authentication bundle contains AuthenticationUser class to create users and AuthenticateClient class to validate users. The AuthenticateClient class has a function

public bool Authenticate(DocumentDatabase currentStore, string username, string password, out AccessTokenBody.DatabaseAccess[] allowedDatabases)

I don't know the way how to use this function. This function requires the DocumentDatabase object.I don't know how to instantiate the DocumentDatabase object. Is there any way to implement authentication ? please tell me the better way if you know any. Thanks in advance.

هل كانت مفيدة؟

المحلول

Rajdeep, you don't need to use this class, nor do you need to instantiate the DocumentDatabase class. This is something internal to RavenDB.

RavenDB uses Windows authentication by default. If you want to use OAuth instead, this is what the Authentication Bundle can be used for. Please take a look here to see how you can use that bundle: http://ravendb.net/docs/server/bundles/authentication

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top