init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Client.FileService.Configuration;
|
||||
using Kreta.Client.FileService.Constant;
|
||||
|
||||
namespace Kreta.Client.FileService.Extension
|
||||
{
|
||||
internal static class FileServiceClientConfigurationExtension
|
||||
{
|
||||
public static Dictionary<string, string> GetPublicTokenRequestParameters(this IFileServiceClientConfiguration fileServiceClientConfiguration)
|
||||
{
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
{ TokenRequest.GrantType, GrantType.ClientCredentials },
|
||||
{ TokenRequest.ClientId, fileServiceClientConfiguration.PublicClientId },
|
||||
{ TokenRequest.ClientSecret, fileServiceClientConfiguration.PublicClientSecret },
|
||||
{ TokenRequest.Scope, Scope.Public },
|
||||
};
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetPrivateTokenRequestParameters(this IFileServiceClientConfiguration fileServiceClientConfiguration)
|
||||
{
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
{ TokenRequest.GrantType, GrantType.ClientCredentials },
|
||||
{ TokenRequest.ClientId, fileServiceClientConfiguration.PrivateClientId },
|
||||
{ TokenRequest.ClientSecret, fileServiceClientConfiguration.PrivateClientSecret },
|
||||
{ TokenRequest.Scope, Scope.Private },
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue