use of org.apache.cxf.jaxrs.security.KerberosAuthenticationFilter in project cxf by apache.
the class BookKerberosServer method run.
protected void run() {
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setResourceClasses(BookStore.class);
// default lifecycle is per-request, change it to singleton
sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStoreImpl()));
KerberosAuthenticationFilter filter = new KerberosAuthenticationFilter();
filter.setLoginContextName("bob");
filter.setCallbackHandler(getCallbackHandler("bob", "bob"));
// filter.setLoginContextName("KerberosServerKeyTab");
// filter.setServicePrincipalName("HTTP/ktab");
sf.setProvider(filter);
sf.setAddress("http://localhost:" + PORT + "/");
sf.create();
}
Aggregations