Skip to content

Commit 3f8280a

Browse files
committed
here is a test from real app, i removed config from code and commented test
1 parent 2ce9d38 commit 3f8280a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Wissance.Authorization/Wissance.Authorization.Tests/OpenId/TestKeyCloakOpenIdAuthenticator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ public void TestTokenRefresh(string userName, string password, string scope, boo
9090
Assert.Equal(token.Session, refreshedToken.Session);
9191
}
9292

93+
/*[Fact]
94+
public void TestGetUserInfoFromBadSsl()
95+
{
96+
IOpenIdAuthenticator authenticator = new KeyCloakOpenIdAuthenticator(_keyCloakOnBadSslConfig , new LoggerFactory());
97+
TokenInfo token = GetToken(authenticator, "adm", "123", TestScope);
98+
Assert.NotNull(token);
99+
Task<UserInfo> getUserInfoTask = authenticator.GetUserInfoAsync(token.AccessToken, token.TokenType);
100+
getUserInfoTask.Wait();
101+
UserInfo actualUserInfo = getUserInfoTask.Result;
102+
Assert.NotNull(actualUserInfo);
103+
}*/
104+
93105
private TokenInfo GetToken(IOpenIdAuthenticator authenticator , string userName, string password, string scope)
94106
{
95107
Task<TokenInfo> authenticateTask = authenticator.AuthenticateAsync(userName, password, scope);

0 commit comments

Comments
 (0)