Skip to content

Commit

Permalink
Profile service added (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleF83 authored Oct 8, 2020
1 parent cd5b5b7 commit 9fb9501
Show file tree
Hide file tree
Showing 14 changed files with 577 additions and 41 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,29 @@ This is the sample of using the server in `docker-compose` configuration:
{
"SubjectId":"1",
"Username":"User1",
"Password":"pwd"
"Password":"pwd",
"Claims": [
{
"Type": "name",
"Value": "Sam Tailor"
},
{
"Type": "email",
"Value": "sam.tailor@gmail.com"
},
{
"Type": "some-api-resource-claim",
"Value": "Sam's Api Resource Custom Claim"
},
{
"Type": "some-api-scope-claim",
"Value": "Sam's Api Scope Custom Claim"
},
{
"Type": "some-identity-resource-claim",
"Value": "Sam's Identity Resource Custom Claim"
}
]
}
]
CLIENTS_CONFIGURATION_PATH: /tmp/config/clients-config.json
Expand Down
3 changes: 2 additions & 1 deletion e2e/config/api-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"Name": "some-app",
"Scopes": ["some-app-scope-1", "some-app-scope-2"],
"ApiSecrets": ["some-app-secret-1"]
"ApiSecrets": ["some-app-secret-1"],
"UserClaims": ["some-app-user-custom-claim"]
}
]
3 changes: 2 additions & 1 deletion e2e/config/api-scopes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[
{
"Name": "some-app-scope-1"
"Name": "some-app-scope-1",
"UserClaims": ["some-app-scope-1-custom-user-claim"]
},
{
"Name": "some-app-scope-2"
Expand Down
26 changes: 23 additions & 3 deletions e2e/config/clients-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"AllowedGrantTypes": ["implicit"],
"AllowAccessTokensViaBrowser": true,
"RedirectUris": ["https://*.google.com"],
"AllowedScopes": ["openid", "profile", "email", "some-custom-identity"],
"AllowedScopes": ["openid", "profile", "email", "some-custom-identity", "some-app-scope-1"],
"IdentityTokenLifetime": 3600,
"AccessTokenLifetime": 3600
},
{
"ClientId": "client-credentials-mock-client-id",
"ClientSecrets": ["client-credentials-mock-client-secret"],
"ClientId": "client-credentials-flow-client-id",
"ClientSecrets": ["client-credentials-flow-client-secret"],
"Description": "Client for client credentials flow",
"AllowedGrantTypes": ["client_credentials"],
"AllowedScopes": ["some-app-scope-1"],
Expand All @@ -28,6 +28,26 @@
}
]
},
{
"ClientId": "password-flow-client-id",
"ClientSecrets": ["password-flow-client-secret"],
"Description": "Client for password flow",
"AllowedGrantTypes": ["password"],
"AllowedScopes": ["openid", "profile", "email", "some-custom-identity", "some-app-scope-1"],
"ClientClaimsPrefix": "",
"Claims": [
{
"Type": "string_claim",
"Value": "string_claim_value"
},
{
"Type": "json_claim",
"Value": "['value1', 'value2']",
"ValueType": "json"
}
],
"RequireClientSecret": false
},
{
"ClientId": "introspect-client-id",
"ClientSecrets": ["introspect-client-secret"],
Expand Down
50 changes: 50 additions & 0 deletions e2e/config/user-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,55 @@
"Value": "Jack's Custom User Claim"
}
]
},
{
"SubjectId": "user_with_custom_api_resource_claims",
"Username": "user_with_custom_api_resource_claims",
"Password": "pwd",
"Claims": [
{
"Type": "name",
"Value": "Sam Tailor"
},
{
"Type": "email",
"Value": "sam.tailor@gmail.com"
},
{
"Type": "some-app-user-custom-claim",
"Value": "Sam's Custom User Claim"
},
{
"Type": "some-app-scope-1-custom-user-claim",
"Value": "Sam's Scope Custom User Claim"
}
]
},
{
"SubjectId": "user_with_all_claim_types",
"Username": "user_with_all_claim_types",
"Password": "pwd",
"Claims": [
{
"Type": "name",
"Value": "Oliver Hunter"
},
{
"Type": "email",
"Value": "oliver.hunter@gmail.com"
},
{
"Type": "some-app-user-custom-claim",
"Value": "Oliver's Custom User Claim"
},
{
"Type": "some-app-scope-1-custom-user-claim",
"Value": "Oliver's Scope Custom User Claim"
},
{
"Type": "some-custom-identity-user-claim",
"Value": "Oliver's Custom User Claim"
}
]
}
]
Loading

0 comments on commit 9fb9501

Please sign in to comment.