Skip to content

Commit 8178886

Browse files
committed
* Try yet another idea for HTTP API client with OAuth2
1 parent 895aec7 commit 8178886

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

projects/Test/OAuth2/OAuth2Options.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,18 @@ public OAuth2HttpApiOptions(Mode mode) : base(mode)
9090
{
9191
}
9292

93-
public override string ClientId => "mgt_api_client";
93+
public override string ClientId
94+
{
95+
get
96+
{
97+
return _mode switch
98+
{
99+
Mode.uaa => "mgt_api_client_2",
100+
Mode.keycloak => "mgt_api_client",
101+
_ => throw new InvalidOperationException(),
102+
};
103+
}
104+
}
94105

95106
public override string ClientSecret
96107
{

projects/Test/OAuth2/keycloak/import/test-realm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
"credentials" : [ ],
509509
"disableableCredentialTypes" : [ ],
510510
"requiredActions" : [ ],
511-
"realmRoles" : [ "default-roles-test", "rabbitmq-management" ],
511+
"realmRoles" : [ "default-roles-test", "rabbitmq-management", "rabbitmq.tag:management" ],
512512
"notBefore" : 0,
513513
"groups" : [ ]
514514
}, {

0 commit comments

Comments
 (0)