Exemplo n.º 1
0
        public async Task <Token> CreateIdentityTokenAsync(TokenCreationRequest request)
        {
            var token = await _delegate.CreateIdentityTokenAsync(request);

            foreach (var tokenServiceHookPlugin in _tokenServiceHookPlugins)
            {
                var tokenResult = await tokenServiceHookPlugin.OnPostCreateIdentityTokenAsync(request, token);

                if (tokenResult.processed)
                {
                    token = tokenResult.token;
                }
            }
            return(token);
        }
Exemplo n.º 2
0
        public async Task <Token> CreateIdentityTokenAsync(TokenCreationRequest request)
        {
            var token = await _delegate.CreateIdentityTokenAsync(request);

            foreach (var tokenServiceHookPlugin in _tokenServiceHookPlugins)
            {
                bool  proccessed;
                Token newToken;
                (proccessed, newToken) = await tokenServiceHookPlugin.OnPostCreateIdentityTokenAsync(request, token);

                if (proccessed)
                {
                    token = newToken;
                }
            }
            return(token);
        }