class ClaimsAuthorizingInterceptor extends AbstractPhaseInterceptor<Message> {

    public void handleMessage(Message message) throws Fault {
        SecurityContext sc = message.get(SecurityContext.class);
        if (!(sc instanceof ClaimsSecurityContext)) {
            throw new AccessDeniedException("Security Context is unavailable or unrecognized");
        }

        Method method = MessageUtils.getTargetMethod(message).orElseThrow(() ->
            new AccessDeniedException("Method is not available : Unauthorized"));

        if (authorize((ClaimsSecurityContext)sc, method)) {
            return;
        }

        throw new AccessDeniedException("Unauthorized");
    }

    public  ClaimsAuthorizingInterceptor();

}