<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Authentication alternatives for REST Webapp in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174338#M127468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can plug in a custom org.activiti.rest.common.filter.RestAuthenticator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/* Licensed under the Apache License, Version 2.0 (the "License");&lt;BR /&gt; * you may not use this file except in compliance with the License.&lt;BR /&gt; * You may obtain a copy of the License at&lt;BR /&gt; * &lt;BR /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow noopener noreferrer"&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/A&gt;&lt;BR /&gt; * &lt;BR /&gt; * Unless required by applicable law or agreed to in writing, software&lt;BR /&gt; * distributed under the License is distributed on an "AS IS" BASIS,&lt;BR /&gt; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;BR /&gt; * See the License for the specific language governing permissions and&lt;BR /&gt; * limitations under the License.&lt;BR /&gt; */&lt;BR /&gt;&lt;BR /&gt;package org.activiti.rest.common.filter;&lt;BR /&gt;&lt;BR /&gt;import org.restlet.Request;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/**&lt;BR /&gt; * Allows enabling/disabling authentication on specific requests and allows authorisation of request after successful&lt;BR /&gt; * authentication.&lt;BR /&gt; * &lt;BR /&gt; * @author Frederik Heremans&lt;BR /&gt; */&lt;BR /&gt;public interface RestAuthenticator {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Called before check is done to see if the request originates from a valid user. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Allows disabling authentication and authorisation for certain requests.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @return true, if the request requires a valid and authorised user. Return false, if the request&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * can be executed without authentication or authorisation. If false is returned, the {@link #isRequestAuthorized(Request)}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * won't be called for this request.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; boolean requestRequiresAuthentication(Request request);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Called after a user is successfully authenticated against the Activiti identity-management. The logged in user&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * can be retrieved from the request's clientInfo object.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @return true, if the user is authorised to perform the request. Return false, if the request is not authorised&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * for the given user.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; boolean isRequestAuthorized(Request request);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Create an implementation of that class, that implements the requestRequiresAuthentication() method. ALWAYS return false here, to prevent the default mechanism of BASIC to kick in. On top of that, check the request for authentication using the mechanism you're using in the ECM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- If the request is authenticated valid, just do "return false" to skip any activiti-specific authentication. Also, best to populate the org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId() in this method, to let the engine know which user is performing the REST-operation (important for history/initiator).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- If the request is invalid (user not authenticated), throw an exception from this method. If you want to have a 401-response (instead of a 500/400), throw a new org.restlet.resource.ResourceException, which allows you to set the status-code and error-message which is picked up and nicely returned to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 10:40:24 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2014-03-10T10:40:24Z</dc:date>
    <item>
      <title>Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174337#M127467</link>
      <description>Hello at all,we have an Enterprise Content Management System and want to trigger the activiti rest services from that ecm system. The ECM application and the activiti rest webapp are using the same LDAP directory. The problem is, that the rest services need username and password as basic authenticat</description>
      <pubDate>Tue, 04 Mar 2014 15:30:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174337#M127467</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-03-04T15:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174338#M127468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can plug in a custom org.activiti.rest.common.filter.RestAuthenticator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/* Licensed under the Apache License, Version 2.0 (the "License");&lt;BR /&gt; * you may not use this file except in compliance with the License.&lt;BR /&gt; * You may obtain a copy of the License at&lt;BR /&gt; * &lt;BR /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow noopener noreferrer"&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/A&gt;&lt;BR /&gt; * &lt;BR /&gt; * Unless required by applicable law or agreed to in writing, software&lt;BR /&gt; * distributed under the License is distributed on an "AS IS" BASIS,&lt;BR /&gt; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;BR /&gt; * See the License for the specific language governing permissions and&lt;BR /&gt; * limitations under the License.&lt;BR /&gt; */&lt;BR /&gt;&lt;BR /&gt;package org.activiti.rest.common.filter;&lt;BR /&gt;&lt;BR /&gt;import org.restlet.Request;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/**&lt;BR /&gt; * Allows enabling/disabling authentication on specific requests and allows authorisation of request after successful&lt;BR /&gt; * authentication.&lt;BR /&gt; * &lt;BR /&gt; * @author Frederik Heremans&lt;BR /&gt; */&lt;BR /&gt;public interface RestAuthenticator {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Called before check is done to see if the request originates from a valid user. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Allows disabling authentication and authorisation for certain requests.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @return true, if the request requires a valid and authorised user. Return false, if the request&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * can be executed without authentication or authorisation. If false is returned, the {@link #isRequestAuthorized(Request)}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * won't be called for this request.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; boolean requestRequiresAuthentication(Request request);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Called after a user is successfully authenticated against the Activiti identity-management. The logged in user&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * can be retrieved from the request's clientInfo object.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @return true, if the user is authorised to perform the request. Return false, if the request is not authorised&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * for the given user.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; boolean isRequestAuthorized(Request request);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Create an implementation of that class, that implements the requestRequiresAuthentication() method. ALWAYS return false here, to prevent the default mechanism of BASIC to kick in. On top of that, check the request for authentication using the mechanism you're using in the ECM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- If the request is authenticated valid, just do "return false" to skip any activiti-specific authentication. Also, best to populate the org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId() in this method, to let the engine know which user is performing the REST-operation (important for history/initiator).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- If the request is invalid (user not authenticated), throw an exception from this method. If you want to have a 401-response (instead of a 500/400), throw a new org.restlet.resource.ResourceException, which allows you to set the status-code and error-message which is picked up and nicely returned to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 10:40:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174338#M127468</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-10T10:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174339#M127469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The custom implementation fo the RestAuthenticator can be set on the instance of the org.activiti.rest.common.application.ActivitiRestApplication (or org.activiti.rest.service.application.ActivitiRestServicesApplication).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 10:41:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174339#M127469</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-10T10:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174340#M127470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In regards to the details of setting the custom implementation of the RestAuthenticator…&amp;nbsp;&amp;nbsp; would you recommend just extending org.activiti.rest.service.application.ActivitiRestServicesApplication with your own instance.. which then calls the setRestAuthenticator(), setting the custom implementation.&amp;nbsp; Then just update the web.xml to define the org.restlet.application to point to your custom Application implementation.&amp;nbsp; Or would there be a better way to use Spring to inject the custom RestAuthenticator instance on the ActivitiRestServicesApplication class.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which do you recommend?&amp;nbsp; Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jordan&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:43:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174340#M127470</guid>
      <dc:creator>jordan_blair</dc:creator>
      <dc:date>2014-03-12T15:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174341#M127471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Depends on how you bootstrap the REST-services. If you're using Spring to wire the REST into your app, you can use the default rest-app and use the bean property. If you're using the REST-war as-is, it's perfectly fine to create a custom web.xml, pointing to a subclass of the application-class, with your magic in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Short answer: both alternatives are fine &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 08:30:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174341#M127471</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-17T08:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174342#M127472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that's exactly what you need to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2014 10:37:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174342#M127472</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-03-17T10:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174343#M127473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I went with the second option and it works well… thanks!!!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 12:45:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174343#M127473</guid>
      <dc:creator>jordan_blair</dc:creator>
      <dc:date>2014-03-18T12:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174344#M127474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@frederikheremans, thank you very much for this detailed manual. I have another question on that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to handout some config parameters to the rest-app. I thought that the &amp;lt;code&amp;gt;org.activiti.spring.SpringProcessEngineConfiguration&amp;lt;/code&amp;gt; bean would be a good place. Therefore, I created 3 Strings and the corresponding getters and setters in SpringProcessEngineConfiguration.java.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I can set the values in the &amp;lt;code&amp;gt;activiti-rest/WEB-INF/classes/activiti-context.xml&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my question: I created an implementation of the custom org.activiti.rest.common.filter.RestAuthenticator in the same package. How can I access the config parameters in my implementation class?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 14:35:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174344#M127474</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-04-25T14:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174345#M127475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No ideas? I need an easy way to access the SpringProcessEngineConfiguration to add Parameters to the Rest API. With the explorer, this was much easier because I use the ExplorerApp Bean (activiti-ui-context.xml) which was available in all classes as singleton.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not want to create a new Spring Bean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your answers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 May 2014 08:52:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174345#M127475</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-05-04T08:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174346#M127476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's no direct way to get to the configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there no way to inject the configuration in your custom RestAuthenticator bean?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can always access the Spring application context and get the configuration bean from that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 14:19:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174346#M127476</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-05-06T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174347#M127477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your answer. Am am very new to Spring. It would be optimal to inject the configuration directly in the custom RestAuthenticator. But I have no idea which steps I have to do (even after studying spring docus). There are so many ways.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would it be enough if I create a new bean in the activiti-context.xml like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;bean id="RestAuthenticatorImpl" class="org.activiti.rest.common.filter.RestAuthenticatorImpl"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;property name="LTPAToken" value="***" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;property name="LTPAPassword" value="***" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/bean&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And then, creating the setter and getter for those attributes? Or do I have do to additional work? For example, I do not understand from where the bean id comes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that this is not directly related to activiti, but it is very difficult to figure out those things in such a great project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You wrote "The custom implementation fo the RestAuthenticator can be set on the instance of the org.activiti.rest.common.application.ActivitiRestApplication (or org.activiti.rest.service.application.ActivitiRestServicesApplication)."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What does that mean? In org.activiti.rest.common.application.ActivitiRestApplication I found this line here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&amp;nbsp;&amp;nbsp; public void setRestAuthenticator(RestAuthenticator restAuthenticator) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.restAuthenticator = restAuthenticator;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I set my Custom Rest Authenticator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very mich for your help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 08:33:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174347#M127477</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-05-08T08:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174348#M127478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I read the Activiti Rest documentation, there you can read: The custom RestAuthenticator should be set on the org.activiti.rest.service.application.ActivitiRestServicesApplication that is used in the RestletServlet. The easiest way for this to create a subclass of the ActivitiRestServicesApplication and use the custom implementation classname in the servlet-mapping.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I am not a skilled Java-Developer, this is not enough for me. I created the class org.activiti.rest.common.filter.RestAuthenticatorImpl.java.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the class ActivitiRestServicesApplication.java, I can´t see any possibility to set my custom implementation. In addition, what sense dies it make to create a subclass of the ActivitiRestServicesApplication.java?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be great if someone could give me a concrete example how I can set my CustomRestAuthenticator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the last step to my goal &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 12:28:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174348#M127478</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-05-08T12:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174349#M127479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a class &amp;lt;code&amp;gt;public class CustomActivitiRestServicesApplication extends ActivitiRestServicesApplication implements RestAuthenticator&amp;lt;/code&amp;gt; in org.activiti.rest.service.application.CustomActivitiRestServicesApplication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this method, I only implement the method &amp;lt;code&amp;gt;public boolean requestRequiresAuthentication(Request request)&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After implementing this, I altered the web.xml of the rest-webapp as following: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;!– Restlet adapter –&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;servlet&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-name&amp;gt;RestletServlet&amp;lt;/servlet-name&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-class&amp;gt;org.restlet.ext.servlet.ServerServlet&amp;lt;/servlet-class&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!– Application class name –&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;org.restlet.application&amp;lt;/param-name&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;org.activiti.rest.service.application.CustomActivitiRestServicesApplication&amp;lt;/param-value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this has no effect, the rest webapp still wants to have basic credentials (even though the method always returns false)….&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I explicitely call &amp;lt;code&amp;gt;setRestAuthenticator()&amp;lt;/code&amp;gt; in my custom implementation? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 14:23:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174349#M127479</guid>
      <dc:creator>b_schnarr</dc:creator>
      <dc:date>2014-05-08T14:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174350#M127480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wonder if you can approach this from a different angle. Can you not use LDAP for Activiti REST and simply have a user for ECM to call the REST api? You can still have a record of who did what in your ECM system and control access there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 19:12:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174350#M127480</guid>
      <dc:creator>ssun</dc:creator>
      <dc:date>2014-05-08T19:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174351#M127481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@frederikheremans Thanks for the continuous support on this. I am also facing the same problem where I want to disable the default Authentication mechanism of Activiti-REST. My Code changes and the problem that I am facing is explained as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Implemented the &amp;lt;blockcode&amp;gt;org.activiti.rest.common.filter.RestAuthenticator&amp;lt;/blockcode&amp;gt; inteface&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.activiti.rest.common.filter.RestAuthenticator;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.restlet.Request;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.restlet.data.ClientInfo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import org.restlet.security.User;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class WFCRestAuthenticatorImpl implements RestAuthenticator&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean isRequestAuthorized(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.isRequestAuthorized()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean requestRequiresAuthentication(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.requestRequiresAuthentication()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Created a custom class extending the &amp;lt;blockcode&amp;gt;org.activiti.rest.service.application.ActivitiRestServicesApplication&amp;lt;/blockcode&amp;gt; to set custom Rest Authenticator implementation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class WFCActivitiRestServicesApplication extends ActivitiRestServicesApplication {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public WFCActivitiRestServicesApplication() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCActivitiRestServicesApplication.WFCActivitiRestServicesApplication()…");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setRestAuthenticator(new WFCRestAuthenticatorImpl());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Updated the web.xml to use this custom implemenation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;servlet&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-name&amp;gt;RestletServlet&amp;lt;/servlet-name&amp;gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-class&amp;gt;org.restlet.ext.servlet.ServerServlet&amp;lt;/servlet-class&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!– Application class name –&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;org.restlet.application&amp;lt;/param-name&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;WFCActivitiRestServicesApplication&amp;lt;/param-value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;The package names have been eliminated&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The SOPs in my custom classes are printed on the console, indicating that Activiti is recognizing the classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I start the Activiti-REST web app deployed on Tomcat 7, I get the following error on the console:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jul 25, 2014 12:21:18 PM org.apache.catalina.startup.HostConfig deployDirectory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO: Deploying web application directory C:\myApp\apache-tomcat-7.0.29\webapps\myActRest&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;12:21:19,257 [localhost-startStop-1] INFO&amp;nbsp; org.activiti.rest.common.servlet.ActivitiServletContextListener&amp;nbsp; - Booting Activiti Process Engine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;12:21:19,267 [localhost-startStop-1] ERROR org.activiti.rest.common.servlet.ActivitiServletContextListener&amp;nbsp; - Could not start the Activiti REST API&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to access a REST (/myActRest/service/deployments) , I get the following exception trace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jul 25, 2014 12:02:05 PM org.restlet.resource.ServerResource doCatch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WARNING: Exception or error caught in server resource&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Internal Server Error (500) - The server encountered an unexpected condition which prevented it from fulfilling the request&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doHandle(ServerResource.java:517)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.get(ServerResource.java:707)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doHandle(ServerResource.java:589)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:649)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:348)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.handle(ServerResource.java:952)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.Finder.handle(Finder.java:246)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.doHandle(Router.java:431)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.handle(Router.java:648)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.Application.handle(Application.java:381)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.doHandle(Router.java:431)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.handle(Router.java:648)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.doHandle(Router.java:431)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Router.handle(Router.java:648)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.doHandle(Filter.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.routing.Filter.handle(Filter.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.Component.handle(Component.java:392)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.Server.handle(Server.java:516)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.ServerHelper.handle(ServerHelper.java:72)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.Thread.run(Thread.java:744)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.application.ActivitiRestApplication.authenticate(ActivitiRestApplication.java:105)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.api.SecuredResource.authenticate(SecuredResource.java:171)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.api.SecuredResource.authenticate(SecuredResource.java:167)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.service.api.legacy.deployment.DeploymentsResource.getDeployments(DeploymentsResource.java:43)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doHandle(ServerResource.java:506)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; … 59 more&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the method &amp;lt;blockcode&amp;gt;org.activiti.rest.common.application.ActivitiRestApplication.authenticate(ActivitiRestApplication.java:105)&amp;lt;/blockcode&amp;gt; source code, it seems that the problem might be related to setting of a user as you have mentioned. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;Also, best to populate the org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId() in this method,&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you elaborate how to retrieve and set the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To prove my above point, I updated the Authenticator implementation to set the user name as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class WFCRestAuthenticatorImpl implements RestAuthenticator&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean isRequestAuthorized(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.isRequestAuthorized()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean requestRequiresAuthentication(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.requestRequiresAuthentication()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ClientInfo cInfo = arg0.getClientInfo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.requestRequiresAuthentication() ClientInfo: " + cInfo);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; User user = new User("kermit");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; cInfo.setUser(user);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This resulted in the following exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.api.ActivitiUtil.getIdentityService(ActivitiUtil.java:70)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.api.SecuredResource.authenticate(SecuredResource.java:178)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.common.api.SecuredResource.authenticate(SecuredResource.java:167)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.rest.service.api.legacy.deployment.DeploymentsResource.getDeployments(DeploymentsResource.java:43)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.restlet.resource.ServerResource.doHandle(ServerResource.java:506)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; … 59 more&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like I am still missing something here in setting the user name and related stuff.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 07:23:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174351#M127481</guid>
      <dc:creator>manchandap</dc:creator>
      <dc:date>2014-07-25T07:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174352#M127482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think, in requestRequiresAuthentication(), you should also setAuthenticated() to true, when creating the ClientInfo object. Setting the user doesn't automatically set that flag to true. If set to true, all BaseResource authenticate() calls will be fine…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 07:40:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174352#M127482</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-07-25T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174353#M127483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@frederikheremans thanks for your inputs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried your suggestion but still getting the same exception. I am using Activiti 5.15. Here's my updated code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class WFCRestAuthenticatorImpl implements RestAuthenticator&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean isRequestAuthorized(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.isRequestAuthorized()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public boolean requestRequiresAuthentication(Request arg0) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.requestRequiresAuthentication()….");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ClientInfo cInfo = arg0.getClientInfo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.out.println("####WFCRestAuthenticatorImpl.requestRequiresAuthentication() ClientInfo: " + cInfo);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; User user = new User("kermit");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; cInfo.setUser(user);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; cInfo.setAuthenticated(true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //Authentication.setAuthenticatedUserId("kermit");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 11:51:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174353#M127483</guid>
      <dc:creator>manchandap</dc:creator>
      <dc:date>2014-07-25T11:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174354#M127484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have overlooked the actual cause of the exception. Seems to be NPE while getting the IdentityService… Did you change anything to the name of the process-engine (non-default) or altered the ActivitiUtilProvider?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 07:44:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174354#M127484</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-07-29T07:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174355#M127485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@frederikheremans thanks for your help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get it working with the above code. Probably there was some issue with the jar files in my WEB-INF\lib directory. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One more question. How can i populate the User object dynamically that is without hard coding. Does Activiti APIs have access to the HTTPRequest object or alternatively which Activiti API should I populate in my filter/servlet with the user name.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 13:48:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174355#M127485</guid>
      <dc:creator>manchandap</dc:creator>
      <dc:date>2014-07-30T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication alternatives for REST Webapp</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174356#M127486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can access the HttpRequest in the "public boolean requestRequiresAuthentication(Request arg0) {" method you implemented. Use IdentityService.setAuthenticatedUserId(…) to let the engine know what user to take for actions that use the logged in user.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 15:16:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-alternatives-for-rest-webapp/m-p/174356#M127486</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-07-30T15:16:20Z</dc:date>
    </item>
  </channel>
</rss>

