permitAll – 401 unauthorized

  • grails-app/conf/application.groovy
    • the following need to be added
      • grails.plugin.springsecurity.filterChain.chainMap = [
        [
        [pattern: ‘/api/offer/getTemplate**’, filters: ‘anonymousAuthenticationFilter,restTokenValidationFilter,restExceptionTranslationFilter,filterInvocationInterceptor’],
    • the following is not necessary
      • grails.plugin.springsecurity.controllerAnnotations.staticRules = [
        [pattern: ‘/’, access: [‘permitAll’]],
  • within controller
    • the following is needed
      • class ShippingController {
        def springSecurityService
        @Secured(‘permitAll’)
        def getIpLoc(){…}
Advertisements
This entry was posted in Grails, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s