public async Task <IdentityServiceResult> UpdateLogoutRedirectUriAsync(TApplication app, string oldRedirectUri, string newRedirectUri, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); if (app == null) { throw new ArgumentNullException(nameof(app)); } if (oldRedirectUri == null) { throw new ArgumentNullException(nameof(oldRedirectUri)); } if (newRedirectUri == null) { throw new ArgumentNullException(nameof(newRedirectUri)); } var existingRedirectUri = await RedirectUris .SingleAsync(ru => ru.ApplicationId.Equals(app.Id) && ru.Value.Equals(oldRedirectUri) && ru.IsLogout); existingRedirectUri.Value = newRedirectUri; return(IdentityServiceResult.Success); }
public async Task <IdentityServiceResult> UnregisterLogoutRedirectUriAsync(TApplication app, string redirectUri, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); if (app == null) { throw new ArgumentNullException(nameof(app)); } if (redirectUri == null) { throw new ArgumentNullException(nameof(redirectUri)); } var registeredUri = await RedirectUris .SingleAsync(ru => ru.ApplicationId.Equals(app.Id) && ru.Value.Equals(redirectUri) && ru.IsLogout); RedirectUris.Remove(registeredUri); return(IdentityServiceResult.Success); }