Search in sources :

Example 1 with AuthenticatorServlet

use of org.wso2.carbon.identity.thrift.authentication.AuthenticatorServlet in project carbon-identity-framework by wso2.

the class ThriftAuthenticationServiceComponent method startThriftHttpAuthenticatorService.

private void startThriftHttpAuthenticatorService(ThriftAuthenticatorService thriftAuthenticatorService) {
    // servlet based authenticator service for authentication for now.
    try {
        AuthenticatorService.Processor authServiceProcessor = new AuthenticatorService.Processor(new AuthenticatorServiceImpl(thriftAuthenticatorService));
        TCompactProtocol.Factory inProtFactory = new TCompactProtocol.Factory();
        TCompactProtocol.Factory outProtFactory = new TCompactProtocol.Factory();
        getHttpServiceInstance().registerServlet("/thriftAuthenticator", new AuthenticatorServlet(authServiceProcessor, inProtFactory, outProtFactory), new Hashtable(), getHttpServiceInstance().createDefaultHttpContext());
    } catch (ServletException e) {
        log.error("Unable to start Thrift Authenticator Service.", e);
    } catch (NamespaceException e) {
        log.error("Unable to start Thrift Authenticator Service", e);
    }
}
Also used : ServletException(javax.servlet.ServletException) AuthenticatorService(org.wso2.carbon.identity.thrift.authentication.internal.generatedCode.AuthenticatorService) ThriftAuthenticatorService(org.wso2.carbon.identity.thrift.authentication.ThriftAuthenticatorService) AuthenticatorServlet(org.wso2.carbon.identity.thrift.authentication.AuthenticatorServlet) Hashtable(java.util.Hashtable) LogFactory(org.apache.commons.logging.LogFactory) NamespaceException(org.osgi.service.http.NamespaceException) TCompactProtocol(org.apache.thrift.protocol.TCompactProtocol)

Aggregations

Hashtable (java.util.Hashtable)1 ServletException (javax.servlet.ServletException)1 LogFactory (org.apache.commons.logging.LogFactory)1 TCompactProtocol (org.apache.thrift.protocol.TCompactProtocol)1 NamespaceException (org.osgi.service.http.NamespaceException)1 AuthenticatorServlet (org.wso2.carbon.identity.thrift.authentication.AuthenticatorServlet)1 ThriftAuthenticatorService (org.wso2.carbon.identity.thrift.authentication.ThriftAuthenticatorService)1 AuthenticatorService (org.wso2.carbon.identity.thrift.authentication.internal.generatedCode.AuthenticatorService)1