lasdf1234 commented on code in PR #11226:
URL: https://github.com/apache/gravitino/pull/11226#discussion_r3311961511
##########
docs/index.md:
##########
@@ -210,7 +210,7 @@ Gravitino provides several ways to configure and manage the
Gravitino server. Se
Gravitino provides security configurations for Gravitino, including HTTPS,
authentication and access control configurations.
* [HTTPS](./security/how-to-use-https.md): provides HTTPS configurations.
-* [Authentication](./security/how-to-authenticate.md): provides authentication
configurations including simple, OAuth, Kerberos.
+* [Authentication](./security/how-to-authenticate.md): provides authentication
configurations including simple, basic, OAuth, and Kerberos.
Review Comment:
Got Resolved.
##########
plugins/idp-basic/src/main/java/org/apache/gravitino/idp/IdpUserGroupManager.java:
##########
@@ -100,13 +151,27 @@ public IdpUser getUser(String username) {
return new IdpUser(userPO.getUsername(),
USER_SERVICE.listGroupNamesByUsername(username));
}
+ public IdpUser authenticate(String username, String password) {
+ try {
+ IdpUserPO userPO = USER_SERVICE.getIdpUserByUsername(username);
+ if (!passwordHasher.verify(password, userPO.getPasswordHash())) {
+ throw new UnauthorizedException(
+ "Invalid username or password",
AuthConstants.AUTHORIZATION_BASIC_HEADER.trim());
+ }
+ return new IdpUser(username,
USER_SERVICE.listGroupNamesByUsername(username));
Review Comment:
Got resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]