1 package com.freemindcafe.apache.cxf.jaxrs.sample9;
2 import org.
apache.cxf.configuration.security.AuthorizationPolicy;
5 import org.
apache.cxf.phase.AbstractPhaseInterceptor;
13 super(Phase.UNMARSHAL);
18 @Override
public void handleMessage(XMLMessage message)
throws Fault {
19 System.out.println(
"BasicAuthInterceptor-----------------");
20 AuthorizationPolicy policy = message.get(AuthorizationPolicy.class);
22 System.out.println(
"usernname - " + policy.getUserName());
23 System.out.println(
"password - " + policy.getPassword());