<processor>
   <!-- Remove the scope validator from the identity.xml if it exists. Otherwise running the build several times
   causes several scope validator elements to be added--> 	
   <remove>
        <name>//s:Server/s:OAuth/s:OAuthScopeValidator</name>
   </remove>	   
   <!-- Add the scope validator config element -->
   <add> 
      <after>//s:Server/s:OAuth/s:OAuthCallbackHandlers</after>
      <value><![CDATA[<OAuthScopeValidator class="org.wso2.carbon.identity.oauth2.validators.JDBCScopeValidator"/>]]></value>
   </add>
   <!-- Add the ntlm grant type validator config element -->
   <add>
      <after>//s:Server/s:OAuth/s:SupportedGrantTypes/s:SupportedGrantType[s:GrantTypeName='iwa:ntlm']/s:GrantTypeName</after>
      <value>
         <![CDATA[<GrantTypeValidatorImplClass>org.wso2.carbon.identity.oauth.common.NTLMAuthenticationValidator</GrantTypeValidatorImplClass>]]></value>
   </add>
   <!-- Add the application_token grant type config element -->
   <add>
      <inside>//s:Server/s:OAuth/s:SupportedGrantTypes</inside>
      <value>
         <![CDATA[
            <SupportedGrantType>
               <GrantTypeName>application_token</GrantTypeName>
               <GrantTypeHandlerImplClass>org.wso2.carbon.apimgt.keymgt.handlers.ApplicationTokenGrantHandler</GrantTypeHandlerImplClass>
               <GrantTypeValidatorImplClass>org.wso2.carbon.apimgt.keymgt.handlers.ApplicationTokenGrantValidator</GrantTypeValidatorImplClass>
           </SupportedGrantType>
            ]]></value>
   </add>
</processor>

<processor>
   <!-- Remove the scope validator from the identity.xml if it exists. Otherwise running the build several times
   causes several scope validator elements to be added--> 	
   <remove>
        <name>//s:Server/s:OAuth/s:OAuthScopeValidator</name>
   </remove>	   
   <!-- Add the scope validator config element -->
   <add> 
      <after>//s:Server/s:OAuth/s:OAuthCallbackHandlers</after>
      <value><![CDATA[<OAuthScopeValidator class="org.wso2.carbon.identity.oauth2.validators.JDBCScopeValidator"/>]]></value>
   </add>
   <!-- Add the ntlm grant type validator config element -->
   <add>
      <after>//s:Server/s:OAuth/s:SupportedGrantTypes/s:SupportedGrantType[s:GrantTypeName='iwa:ntlm']/s:GrantTypeName</after>
      <value>
         <![CDATA[<GrantTypeValidatorImplClass>org.wso2.carbon.identity.oauth.common.NTLMAuthenticationValidator</GrantTypeValidatorImplClass>]]></value>
   </add>
</processor>

Revert "Adding application token grant handler into identity.xml"
Revert "Adding application token grant handler into identity.xml"
