0

I have the following sring security configuration:

<security:authentication-manager>
    <security:authentication-provider ref="provider1"/>
    <security:authentication-provider ref="provider2"/>
    <security:authentication-provider ref="provider3"/>
    <security:authentication-provider ref="provider4"/>
    <security:authentication-provider ref="provider5"/>
    <security:authentication-provider ref="provider6"/>
</security:authentication-manager>

Now I need always return auth fail if now later than 21-00.

I don't want to add same code to each provider.

Is there nicer way?

gstackoverflow
  • 34,819
  • 98
  • 304
  • 641

1 Answers1

0

This is a typical example for an custom security web expression. It is used in the intercept-url pattern instead of an authentication provider

For some details have a look at this answer, it has some more details about implementing a custom expression

Community
  • 1
  • 1
Ralph
  • 115,440
  • 53
  • 279
  • 370