diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-03-06 22:53:36 -0500 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-03-06 22:53:36 -0500 |
commit | a3fbcd713ae9a6b3f38dcc42a5c4c2f369a5d6f5 (patch) | |
tree | ed019f6dc374df3da88b1cdadaeaae92e799b96e /ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java | |
parent | 7cb123c21bef247a2216545bc18245136f2ddf78 (diff) | |
download | JellySolutions-a3fbcd713ae9a6b3f38dcc42a5c4c2f369a5d6f5.tar.gz JellySolutions-a3fbcd713ae9a6b3f38dcc42a5c4c2f369a5d6f5.tar.bz2 JellySolutions-a3fbcd713ae9a6b3f38dcc42a5c4c2f369a5d6f5.zip |
more javadocs and cleanup
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java index 7e54cfb..591d891 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java @@ -1,11 +1,10 @@ package com.ufund.api.ufundapi.service; -import java.io.IOException; - -import org.springframework.stereotype.Component; - import com.ufund.api.ufundapi.model.UserAuth; import com.ufund.api.ufundapi.persistence.UserAuthDAO; +import org.springframework.stereotype.Component; + +import java.io.IOException; @Component public class AuthService { @@ -24,9 +23,8 @@ public class AuthService { * @param username The username of the user trying to be accessed. * @param key The api key obtained by the client from logging in. * @throws IllegalAccessException Thrown if access was denied to the user. - * @throws IOException - */ - public void authenticate(String username, String key) throws IllegalAccessException, IOException { + */ + public void authenticate(String username, String key) throws IllegalAccessException, IOException { var userAuth = userAuthDAO.getUserAuth(key); if (userAuth == null || !userAuth.getUsername().equals(username)) { throw new IllegalAccessException("Unauthorized"); |