Skip to content

Commit

Permalink
[ALS-5514] Change POST to GET in OktaAuthenticationService
Browse files Browse the repository at this point in the history
This update modifies the HTTP method for the authenticate method in OktaAuthenticationService from POST to GET. This change aligns with our data retrieval patterns, and adapts it to receive parameters from the URL instead of the request body. The import statement also refactored to use wildcard import for javax.ws.rs package.
  • Loading branch information
Gcolon021 committed Jan 10, 2024
1 parent 9b0c55e commit 149de14
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.*;
import javax.ws.rs.core.*;
import java.util.Map;

Expand All @@ -27,9 +24,9 @@ public class OktaAuthenticationService {
private final String oktaDomain = System.getenv("okta_client_origin");
private final String apiToken = System.getenv("okta_client_api_token");

@POST
@GET
@Path("/authentication")
public Response authenticate(@Context HttpHeaders httpHeaders, @Context UriInfo uriInfo, Map<String, String> authRequest) {
public Response authenticate(@Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) {
Client client = Clients.builder()
.setOrgUrl(oktaDomain)
.setClientCredentials(new TokenClientCredentials(apiToken))
Expand Down

0 comments on commit 149de14

Please sign in to comment.