Search in sources :

Example 1 with HandlerContext

use of com.sun.enterprise.security.jmac.config.HandlerContext in project Payara by payara.

the class PipeHelper method getHandlerContext.

@Override
protected HandlerContext getHandlerContext(Map map) {
    String realmName = null;
    WebServiceEndpoint wSE = (WebServiceEndpoint) map.get(PipeConstants.SERVICE_ENDPOINT);
    if (wSE != null) {
        Application app = wSE.getBundleDescriptor().getApplication();
        if (app != null) {
            realmName = app.getRealm();
        }
        if (realmName == null) {
            realmName = wSE.getRealm();
        }
    }
    final String fRealmName = realmName;
    return new HandlerContext() {

        @Override
        public String getRealmName() {
            return fRealmName;
        }
    };
}
Also used : WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) HandlerContext(com.sun.enterprise.security.jmac.config.HandlerContext) Application(com.sun.enterprise.deployment.Application)

Example 2 with HandlerContext

use of com.sun.enterprise.security.jmac.config.HandlerContext in project Payara by payara.

the class ContainerCallbackHandler method setHandlerContext.

public void setHandlerContext(String realm) {
    final String fRealmName = realm;
    HandlerContext handlerContext = new HandlerContext() {

        public String getRealmName() {
            return fRealmName;
        }
    };
    ((BaseContainerCallbackHandler) handler).setHandlerContext(handlerContext);
}
Also used : HandlerContext(com.sun.enterprise.security.jmac.config.HandlerContext)

Aggregations

HandlerContext (com.sun.enterprise.security.jmac.config.HandlerContext)2 Application (com.sun.enterprise.deployment.Application)1 WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)1