|
|
@ -1,7 +1,6 @@ |
|
|
|
using IdentityServer4.Models; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using IdentityServer4; |
|
|
|
using IdentityServer4.Models; |
|
|
|
using System.Collections.Generic; |
|
|
|
using IdentityServer4; |
|
|
|
|
|
|
|
namespace Identity.API.Configuration |
|
|
|
{ |
|
|
@ -56,19 +55,26 @@ namespace Identity.API.Configuration |
|
|
|
{ |
|
|
|
ClientId = "xamarin", |
|
|
|
ClientName = "eShop Xamarin OpenId Client", |
|
|
|
AllowedGrantTypes = GrantTypes.Implicit, |
|
|
|
AllowAccessTokensViaBrowser = true, |
|
|
|
RedirectUris = { clientsUrl["Xamarin"] }, |
|
|
|
AllowedGrantTypes = GrantTypes.Hybrid, |
|
|
|
//Used to retrieve the access token on the back channel.
|
|
|
|
ClientSecrets = |
|
|
|
{ |
|
|
|
new Secret("secret".Sha256()) |
|
|
|
}, |
|
|
|
RedirectUris = { clientsUrl["Xamarin"] }, |
|
|
|
RequireConsent = false, |
|
|
|
PostLogoutRedirectUris = { $"{clientsUrl["Xamarin"]}/Account/Redirecting" }, |
|
|
|
AllowedCorsOrigins = { "http://eshopxamarin" }, |
|
|
|
AllowedScopes = |
|
|
|
AllowedCorsOrigins = { "http://eshopxamarin" }, |
|
|
|
AllowedScopes = new List<string> |
|
|
|
{ |
|
|
|
IdentityServerConstants.StandardScopes.OpenId, |
|
|
|
IdentityServerConstants.StandardScopes.Profile, |
|
|
|
IdentityServerConstants.StandardScopes.OfflineAccess, |
|
|
|
"orders", |
|
|
|
"basket" |
|
|
|
} |
|
|
|
}, |
|
|
|
//Allow requesting refresh tokens for long lived API access
|
|
|
|
AllowOfflineAccess = true |
|
|
|
}, |
|
|
|
new Client |
|
|
|
{ |
|
|
@ -96,7 +102,7 @@ namespace Identity.API.Configuration |
|
|
|
IdentityServerConstants.StandardScopes.Profile, |
|
|
|
IdentityServerConstants.StandardScopes.OfflineAccess, |
|
|
|
"orders", |
|
|
|
"basket", |
|
|
|
"basket" |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|