Results 1 to 2 of 2

Thread: ACEGI Authentication for a RESTful service

  1. #1
    Join Date
    Dec 2006
    Posts
    20

    Default ACEGI Authentication for a RESTful service

    This is may be glaringly obvious but -

    I want to write an API framework that will provide data to the outside world in XML format, as long as they are authenticated (like the Google API).

    Is this possible with ACEGI? What do I have to do.

    I'm really a novice when it comes to web services, but if you can point me in the right direction - hopefully I'll get it sooner than later.

    Thanks,

    Murali

  2. #2
    Join Date
    Aug 2005
    Location
    Orlando, FL
    Posts
    20

    Default

    While there isn't a section specifically for web services in the Acegi Security reference, all the pieces are there. See the Filters section.

    Code:
    <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
      <property name="filterInvocationDefinitionSource">
        <value>
          CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
          PATTERN_TYPE_APACHE_ANT
          /webServices/**=httpSessionContextIntegrationFilterWithASCFalse,basicProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
          /**=httpSessionContextIntegrationFilterWithASCTrue,authenticationProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
        </value>
      </property>
    </bean>
    Notice the separate filter chain for web services? When a request comes in matching /webServices, Basic authentication is required. You can also use Digest authentication.
    Mat Lowery
    Pentaho Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •