Browse Source
Add FrontChannelLogoutUri property and related methods to OpenIddict application classes
pull/23196/head
maliming
7 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
5 changed files with
34 additions and
4 deletions
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/AbpApplicationDescriptor.cs
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/AbpApplicationManager.cs
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/AbpOpenIddictApplicationStore.cs
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/IAbpOpenIdApplicationStore.cs
-
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/OpenIddictApplicationModel.cs
|
|
|
@ -4,13 +4,18 @@ namespace Volo.Abp.OpenIddict.Applications; |
|
|
|
|
|
|
|
public class AbpApplicationDescriptor : OpenIddictApplicationDescriptor |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the front-channel logout URI associated with the application.
|
|
|
|
/// </summary>
|
|
|
|
public virtual string FrontChannelLogoutUri { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// URI to further information about client.
|
|
|
|
/// </summary>
|
|
|
|
public string ClientUri { get; set; } |
|
|
|
public virtual string ClientUri { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// URI to client logo.
|
|
|
|
/// </summary>
|
|
|
|
public string LogoUri { get; set; } |
|
|
|
public virtual string LogoUri { get; set; } |
|
|
|
} |
|
|
|
|
|
|
|
@ -44,6 +44,7 @@ public class AbpApplicationManager : OpenIddictApplicationManager<OpenIddictAppl |
|
|
|
|
|
|
|
if (descriptor is AbpApplicationDescriptor model) |
|
|
|
{ |
|
|
|
model.FrontChannelLogoutUri = application.FrontChannelLogoutUri; |
|
|
|
model.ClientUri = application.ClientUri; |
|
|
|
model.LogoUri = application.LogoUri; |
|
|
|
} |
|
|
|
@ -55,11 +56,21 @@ public class AbpApplicationManager : OpenIddictApplicationManager<OpenIddictAppl |
|
|
|
|
|
|
|
if (descriptor is AbpApplicationDescriptor model) |
|
|
|
{ |
|
|
|
application.FrontChannelLogoutUri = model.FrontChannelLogoutUri; |
|
|
|
application.ClientUri = model.ClientUri; |
|
|
|
application.LogoUri = model.LogoUri; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async ValueTask<string> GetFrontChannelLogoutUriAsync(object application, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Check.NotNull(application, nameof(application)); |
|
|
|
Check.AssignableTo<IAbpOpenIdApplicationStore>(application.GetType(), nameof(application)); |
|
|
|
|
|
|
|
return await Store.As<IAbpOpenIdApplicationStore>().GetFrontChannelLogoutUriAsync(application.As<OpenIddictApplicationModel>(), cancellationToken); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual async ValueTask<string> GetClientUriAsync(object application, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Check.NotNull(application, nameof(application)); |
|
|
|
|
|
|
|
@ -635,6 +635,13 @@ public class AbpOpenIddictApplicationStore : AbpOpenIddictStoreBase<IOpenIddictA |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async ValueTask<string> GetFrontChannelLogoutUriAsync(OpenIddictApplicationModel application, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Check.NotNull(application, nameof(application)); |
|
|
|
|
|
|
|
return await new ValueTask<string>(application.FrontChannelLogoutUri); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual ValueTask<string> GetClientUriAsync(OpenIddictApplicationModel application, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
Check.NotNull(application, nameof(application)); |
|
|
|
|
|
|
|
@ -6,6 +6,8 @@ namespace Volo.Abp.OpenIddict.Applications; |
|
|
|
|
|
|
|
public interface IAbpOpenIdApplicationStore : IOpenIddictApplicationStore<OpenIddictApplicationModel> |
|
|
|
{ |
|
|
|
ValueTask<string> GetFrontChannelLogoutUriAsync(OpenIddictApplicationModel application, CancellationToken cancellationToken = default); |
|
|
|
|
|
|
|
ValueTask<string> GetClientUriAsync(OpenIddictApplicationModel application, CancellationToken cancellationToken = default); |
|
|
|
|
|
|
|
ValueTask<string> GetLogoUriAsync(OpenIddictApplicationModel application, CancellationToken cancellationToken = default); |
|
|
|
|
|
|
|
@ -89,13 +89,18 @@ public class OpenIddictApplicationModel : ExtensibleObject |
|
|
|
/// </summary>
|
|
|
|
public virtual string Settings { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the front-channel logout URI associated with the application.
|
|
|
|
/// </summary>
|
|
|
|
public virtual string FrontChannelLogoutUri { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// URI to further information about client.
|
|
|
|
/// </summary>
|
|
|
|
public string ClientUri { get; set; } |
|
|
|
public virtual string ClientUri { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// URI to client logo.
|
|
|
|
/// </summary>
|
|
|
|
public string LogoUri { get; set; } |
|
|
|
public virtual string LogoUri { get; set; } |
|
|
|
} |
|
|
|
|