2017-08-17 2 views

Répondre

0

De la documentation sur External Authentication:

UserManager définit un point d'extension nommée «source d'authentification externe. Nous pouvons créer une classe dérivée de IExternalAuthenticationSource et vous inscrire à la configuration. Il existe classe DefaultExternalAuthenticationSource pour simplifier l'implémentation de IExternalAuthenticationSource. Voyons un exemple:

public class MyExternalAuthSource : DefaultExternalAuthenticationSource<Tenant, User> 
{ 
    public override string Name => "MyCustomSource"; 

    public override Task<bool> TryAuthenticateAsync(string userNameOrEmailAddress, string plainPassword, Tenant tenant) 
    { 
     // Authenticate user and return true or false 
    } 
} 
+0

Mais j'ai 'Aucun composant pour supporter le service Abp.Zero.Configuration.IAbp Zero Config était found', – Aria

+0

Dois-je ajouter' Abp.Zero.Common.dll' – Aria

+0

J'ai répondu [votre question] (https://stackoverflow.com/a/49107781/8601760). – aaron