Exemplo n.º 1
0
        public EndSessionResult(EndSessionValidationResult result)
        {
            if (result == null)
            {
                throw new ArgumentNullException(nameof(result));
            }

            _result = result;
        }
Exemplo n.º 2
0
 internal EndSessionResult(
     EndSessionValidationResult result,
     IdentityServerOptions options,
     IMessageStore <LogoutMessage> logoutMessageStore)
     : this(result)
 {
     _options            = options;
     _logoutMessageStore = logoutMessageStore;
 }
Exemplo n.º 3
0
 internal EndSessionResult(
     EndSessionValidationResult result,
     IdentityServerOptions options,
     ISystemClock clock,
     IServerUrls urls,
     IMessageStore <LogoutMessage> logoutMessageStore)
     : this(result)
 {
     _options            = options;
     _clock              = clock;
     _urls               = urls;
     _logoutMessageStore = logoutMessageStore;
 }
Exemplo n.º 4
0
        private async Task <IEndpointResult> CreateLogoutPageRedirectAsync(EndSessionValidationResult result)
        {
            var validatedRequest = result.IsError ? null : result.ValidatedRequest;

            if (validatedRequest != null &&
                (validatedRequest.Client != null || validatedRequest.PostLogOutUri != null))
            {
                var msg = new MessageWithId <LogoutMessage>(new LogoutMessage(validatedRequest));
                await _logoutMessageStore.WriteAsync(msg.Id, msg);

                return(new LogoutPageResult(_context.Options.UserInteractionOptions, msg.Id));
            }

            return(new LogoutPageResult(_context.Options.UserInteractionOptions));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndSessionResult"/> class.
 /// </summary>
 /// <param name="result">The result.</param>
 /// <exception cref="System.ArgumentNullException">result</exception>
 public EndSessionResult(EndSessionValidationResult result)
 {
     _result = result ?? throw new ArgumentNullException(nameof(result));
 }