Last active
December 7, 2017 10:44
-
-
Save HamidMosalla/9dd96d531995631896f0ec1582cb47e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Config | |
{ | |
public static IEnumerable<Client> GetClients() | |
{ | |
return new List<Client> | |
{ | |
new Client | |
{ | |
ClientId = "client1", | |
// no interactive user, use the clientid/secret for authentication | |
AllowedGrantTypes = GrantTypes.ClientCredentials, | |
// secret for authentication | |
ClientSecrets = | |
{ | |
new Secret("123654".Sha256()) | |
}, | |
// scopes that client has access to | |
AllowedScopes = {"Api1"}, | |
Claims = new[] | |
{ | |
new Claim("Employee", "Mosalla"), | |
new Claim("website", "http://hamidmosalla.com") | |
}, | |
ClientClaimsPrefix = "" | |
}, | |
new Client | |
{ | |
ClientId = "ro.client1", | |
AllowedGrantTypes = GrantTypes.ResourceOwnerPassword, | |
ClientSecrets = | |
{ | |
new Secret("123654".Sha256()) | |
}, | |
AllowedScopes = {"Api1"} | |
} | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment