|
|
@ -9,11 +9,10 @@ namespace eShopOnContainers.Core.Services.Identity |
|
|
|
{ |
|
|
|
public class IdentityService : IIdentityService |
|
|
|
{ |
|
|
|
public string CreateAuthorizeRequest() |
|
|
|
public string CreateAuthorizationRequest() |
|
|
|
{ |
|
|
|
// Create URI to authorize endpoint
|
|
|
|
var authorizeRequest = |
|
|
|
new AuthorizeRequest(GlobalSetting.Instance.IdentityEndpoint); |
|
|
|
// Create URI to authorization endpoint
|
|
|
|
var authorizeRequest = new AuthorizeRequest(GlobalSetting.Instance.IdentityEndpoint); |
|
|
|
|
|
|
|
// Dictionary with values for the authorize request
|
|
|
|
var dic = new Dictionary<string, string>(); |
|
|
@ -29,7 +28,6 @@ namespace eShopOnContainers.Core.Services.Identity |
|
|
|
dic.Add("state", currentCSRFToken); |
|
|
|
|
|
|
|
var authorizeUri = authorizeRequest.Create(dic); |
|
|
|
|
|
|
|
return authorizeUri; |
|
|
|
} |
|
|
|
|
|
|
@ -53,6 +51,7 @@ namespace eShopOnContainers.Core.Services.Identity |
|
|
|
string partToConvert = parts[1]; |
|
|
|
partToConvert = partToConvert.Replace('-', '+'); |
|
|
|
partToConvert = partToConvert.Replace('_', '/'); |
|
|
|
|
|
|
|
switch (partToConvert.Length % 4) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|