- ApiService apiResp = new ApiService()
- .setAuth( requestContext.getHeaderString("Authorization") )
- .setUriPath(requestContext.getUriInfo().getPath())
- .setHttpMethod( requestContext.getMethod() )
- .setRequestId( requestContext.getHeaderString("X-ECOMP-RequestID") );
-
- try {
- apiResp.checkAuthorization();
- } catch ( AuthenticationErrorException ae ) {
- logger.error("Error", ae);
- requestContext.abortWith( responseBuilder.unauthorized( apiResp.getErr().getMessage() ) );
- } catch ( Exception e ) {
- logger.error("Error", e);
- requestContext.abortWith( responseBuilder.unavailable() );
- }
+ if(!isAafEnabled) {
+ ApiService apiResp = new ApiService()
+ .setAuth(requestContext.getHeaderString("Authorization"))
+ .setUriPath(requestContext.getUriInfo().getPath())
+ .setHttpMethod(requestContext.getMethod())
+ .setRequestId(requestContext.getHeaderString("X-ECOMP-RequestID"));