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
  • 36,709
  • 117
  • 359
  • 710

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
  • 118,862
  • 56
  • 287
  • 383