Shiro plugin: accepting terms and conditions?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Shiro plugin: accepting terms and conditions?

Graham Leggett
Hi all,

We have a system that uses shiro for authentication. We have a need for our users to accept terms and conditions before using our system.

Does a shiro plugin exist that, after authentication is complete, checks that the user is a member of a “accepted terms and conditions” group, and if not, redirect the client to the URL that handles accepting terms and conditions?

(This is a tricky thing to google for).

Regards,
Graham



smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Shiro plugin: accepting terms and conditions?

Brian Demers
There isn't anything in Shiro would directly solve a "terms & conditions". 

However, you create a filter that checks if your subject has accepted the terms (guessing a db lookup).  Route all your requests through the filter. (Your filter would then need to handle the redirect/forward to your terms page)

```
[main]
...
termsConditions = com.company.web.some.TermsConditionsFilter
termsConditions.property1 = value1
...

[urls]
...
/some/path/** = termsConditions
```

Keep us posted!

On Tue, Mar 6, 2018 at 6:39 AM, Graham Leggett <[hidden email]> wrote:
Hi all,

We have a system that uses shiro for authentication. We have a need for our users to accept terms and conditions before using our system.

Does a shiro plugin exist that, after authentication is complete, checks that the user is a member of a “accepted terms and conditions” group, and if not, redirect the client to the URL that handles accepting terms and conditions?

(This is a tricky thing to google for).

Regards,
Graham