GenerateNewApiKeys() 공개 메소드

public GenerateNewApiKeys ( string userId ) : List
userId string
리턴 List
        public override void OnRegistered(IRequest httpReq, IAuthSession session, IServiceBase registrationService)
        {
            var apiKeys  = apiKeyProvider.GenerateNewApiKeys(session.UserAuthId);
            var authRepo = (IManageApiKeys)httpReq.TryResolve <IAuthRepository>().AsUserAuthRepository(httpReq);

            authRepo.StoreAll(apiKeys);
        }
예제 #2
0
 public override void OnRegistered(IRequest httpReq, IAuthSession session, IServiceBase registrationService)
 {
     var apiKeys = apiKeyProvider.GenerateNewApiKeys(session.UserAuthId);
     var authRepo = (IManageApiKeys)HostContext.AppHost.GetAuthRepository(httpReq);
     using (authRepo as IDisposable)
     {
         authRepo.StoreAll(apiKeys);
     }
 }
예제 #3
0
        public override async Task OnRegisteredAsync(IRequest httpReq, IAuthSession session, IServiceBase registrationService,
                                                     CancellationToken token = default)
        {
            var apiKeys       = apiKeyProvider.GenerateNewApiKeys(session.UserAuthId);
            var manageApiKeys = HostContext.AppHost.AssertManageApiKeysAsync(httpReq);

            using (manageApiKeys as IDisposable)
            {
                await manageApiKeys.StoreAllAsync(apiKeys, token).ConfigAwait();
            }
        }