|
|
@@ -1,4 +1,5 @@
|
|
|
-using IdentityServer4.Models;
|
|
|
+using IdentityServer4;
|
|
|
+using IdentityServer4.Models;
|
|
|
using IdentityServer4.Test;
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
@@ -15,6 +16,16 @@ namespace CasinosManager.IdentityServer
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ public static IEnumerable<IdentityResource> GetIdentityResource()
|
|
|
+ {
|
|
|
+ return new List<IdentityResource>
|
|
|
+ {
|
|
|
+ new IdentityResources.OpenId(),
|
|
|
+ new IdentityResources.Profile(),
|
|
|
+ new IdentityResources.Email()
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
// clients want to access resources (aka scopes)
|
|
|
public static IEnumerable<Client> GetClients()
|
|
|
{
|
|
|
@@ -31,7 +42,13 @@ namespace CasinosManager.IdentityServer
|
|
|
{
|
|
|
new Secret("secret".Sha256())
|
|
|
},
|
|
|
- AllowedScopes = { "CasinosApi" }
|
|
|
+ AllowedScopes =
|
|
|
+ {
|
|
|
+ "CasinosApi",
|
|
|
+ IdentityServerConstants.StandardScopes.Profile,
|
|
|
+ IdentityServerConstants.StandardScopes.OpenId,
|
|
|
+ IdentityServerConstants.StandardScopes.OfflineAccess
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
}
|