getRequestHeaders() always null

I’m writing a logging spi to record some value in the http request header. Yet getRequestHeaders() always return null, either trigger keycloak API e.g. token or direct operation on keycloak admin page. Here is some code snippet as below. We can see context is not null yet context.getRequestHeaders() is null. Can anybody advise this? Thanks.

    final KeycloakContext context = session.getContext();"CCC-----" + context);

    final HttpHeaders requestHeaders = context.getRequestHeaders();"AAA-----" + requestHeaders);

2022-03-07 15:22:47,094 INFO [] (default task-13) [][][][][][]
2022-03-07 15:22:47,102 INFO [] (default task-13) [][][][][][] AAA-----null