public SignOutMessage CreateSignoutMessage(ValidatedEndSessionRequest request) { var message = new SignOutMessage(); if (request.Client != null) { message.ClientId = request.Client.ClientId; if (request.PostLogOutUri != null) { message.ReturnUrl = request.PostLogOutUri; } else { if (request.Client.PostLogoutRedirectUris.Any()) { message.ReturnUrl = request.Client.PostLogoutRedirectUris.First(); } } if (request.State.IsPresent()) { if (message.ReturnUrl.IsPresent()) { message.ReturnUrl = message.ReturnUrl.AddQueryString("state=" + request.State); } } } return message; }
public EndSessionRequestValidationLog(ValidatedEndSessionRequest request) { if (request.Options.DiagnosticsOptions.IncludeSensitiveDataInLogs) { Raw = request.Raw.ToDictionary(); } SubjectId = "unknown"; if (request.Subject != null) { var subjectClaim = request.Subject.FindFirst(Constants.ClaimTypes.Subject); if (subjectClaim != null) { SubjectId = subjectClaim.Value; } } if (request.Client != null) { ClientId = request.Client.ClientId; ClientName = request.Client.ClientName; } PostLogOutUri = request.PostLogOutUri; State = request.State; }
public EndSessionRequestValidator(IdentityServerOptions options, IOwinContext context, TokenValidator tokenValidator, IClientStore clients) { _tokenValidator = tokenValidator; _validatedRequest = new ValidatedEndSessionRequest { Options = options, Environment = context.Environment }; }
public EndSessionRequestValidator(IdentityServerOptions options, TokenValidator tokenValidator, IRedirectUriValidator uriValidator) { _tokenValidator = tokenValidator; _uriValidator = uriValidator; _validatedRequest = new ValidatedEndSessionRequest { Options = options, }; }
public EndSessionRequestValidator(IdentityServerOptions options, IOwinContext context, TokenValidator tokenValidator, IRedirectUriValidator uriValidator) { _tokenValidator = tokenValidator; _uriValidator = uriValidator; _validatedRequest = new ValidatedEndSessionRequest { Options = options, Environment = context.Environment }; }