30 lines
749 B
C#
30 lines
749 B
C#
|
|
namespace IdentityShroud.Core.Services.OpenId;
|
||
|
|
|
||
|
|
public interface ITokenService
|
||
|
|
{
|
||
|
|
Task<Result<TokenResponse>> Handle(
|
||
|
|
Dictionary<string, string> form,
|
||
|
|
string? basicAuthUser,
|
||
|
|
string? basicAuthPassword,
|
||
|
|
CancellationToken ct = default);
|
||
|
|
}
|
||
|
|
|
||
|
|
public class TokenService : ITokenService
|
||
|
|
{
|
||
|
|
public async Task<Result<TokenResponse>> Handle(
|
||
|
|
Dictionary<string, string> form,
|
||
|
|
string? basicAuthUser,
|
||
|
|
string? basicAuthPassword,
|
||
|
|
CancellationToken ct = default)
|
||
|
|
{
|
||
|
|
return new();
|
||
|
|
}
|
||
|
|
|
||
|
|
public async Task<Result<TokenResponse>> ClientCredentialsFlow(
|
||
|
|
string clientId,
|
||
|
|
string clientSecret,
|
||
|
|
CancellationToken ct = default)
|
||
|
|
{
|
||
|
|
return new();
|
||
|
|
}
|
||
|
|
}
|