dataobjects-net icon indicating copy to clipboard operation
dataobjects-net copied to clipboard

Xtensive.Orm 7.2beta-1 Authentication issue

Open AnamikaDe8 opened this issue 6 months ago • 8 comments

@SergeiPavlov @alexyakunin @shuruev @AlexUstinov We have a question. Background

A .Net 4.7.2 web project with razor pages has been upgraded to .net 8.

  1. Servicestack 3 upgraded to ServiceStack 8
  2. Xtensive.Orm 5  7.2-Beta

We are facing an issue while trying to authenticate “auth/credentials” using IAuthenticationService Interface of Xtensive.orm.Security.

The IAuthenticationService.Authenticate returns null error

protected override IPrincipal Authenticate(string userNameOrEmail, string password) { var config = this.Session.GetSecurityConfiguration(); var service = this.Session.Services.Get<IServiceStackHashingService>(config.HashingServiceName);Error here 

 if (service == null)
     throw new InvalidOperationException(string.Format("Hashing service by name {0} is not found. Check Xtensive.Security configuration", config.HashingServiceName));

} error HashingServiceName = plain

We are guessing, the services are not getting registered properly.

We have used Domain Factory to initialize the DomainConfig and implemented a auth class from IAuthenticationService.

Could you please help.

AnamikaDe8 avatar Jul 31 '24 10:07 AnamikaDe8