For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

developerdevelo's avatar
developerdevelo
Icon for Nimbostratus rankNimbostratus
Sep 13, 2018

F5 token authentication - 401 F5 Authorization Required

I'm trying to programmatically(Java) hit f5 with token authentication. The id that i'm using is currently basic auth enabled. While it is still basic auth enabled, I can successfully make calls to f5 using only token(no basic auth used). But when the id is disabled from using basic auth, I get the error "401 F5 Authorization Required" with the same code. Any help is appreciated! Here is the code:

 

HttpHeaders headers = new HttpHeaders(); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); restTemplate = getRestTemplate();

 

headers.set("X-F5-Auth-Token", tokenObj.getToken()); HttpEntity

 

httpEntity = new HttpEntity(headers);

 

response = restTemplate.exchange(url, HttpMethod.GET,httpEntity,responseType);

 

 

5 Replies