Browse Source
Include the email in the OAuth2 user resolution log message
fix/oauth2-user-tenant-lts-4.2
Viacheslav Klimov
6 days ago
Failed to extract signature
1 changed files with
2 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/service/security/auth/oauth2/AbstractOAuth2ClientMapper.java
|
|
@ -181,8 +181,8 @@ public abstract class AbstractOAuth2ClientMapper { |
|
|
if (user.getTenantId().equals(oAuth2Client.getTenantId())) { |
|
|
if (user.getTenantId().equals(oAuth2Client.getTenantId())) { |
|
|
return user; |
|
|
return user; |
|
|
} |
|
|
} |
|
|
log.warn("OAuth2 client [{}] of tenant [{}] attempted to log in as user [{}] of tenant [{}]", |
|
|
log.warn("OAuth2 client [{}] of tenant [{}] cannot resolve user [{}] [{}] of tenant [{}]: outside of the client tenant", |
|
|
oAuth2Client.getId(), oAuth2Client.getTenantId(), user.getId(), user.getTenantId()); |
|
|
oAuth2Client.getId(), oAuth2Client.getTenantId(), user.getId(), email, user.getTenantId()); |
|
|
throw new UsernameNotFoundException("User not found: " + email); |
|
|
throw new UsernameNotFoundException("User not found: " + email); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|