code: public void authenticateAuthorize(List<String> authHeader, String resource, AuthHandler.Permissions permission)
              throws AuthException {
          if (isAuthEnabled()) {
              String credentials = parseCredentials(authHeader);
              if (!pravegaAuthManager.authenticateAndAuthorize(resource, credentials, permission)) {
                  throw new AuthException(
                          String.format("Failed to authenticate or authorize for resource [%s]", resource),
                          Response.Status.FORBIDDEN.getStatusCode());
              }
          }
      }
docs: Ensures that the subject represented by the given {@code authHeader} is authenticated and that the subject is
  authorized for the specified {@code permission} on the given {@code resource}.
  
  @param authHeader contents of an HTTP Authorization header
  @param resource   representation of the resource being accessed
  @param permission the permission
  @throws AuthException if authentication/authorization fails