Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

CAS login plugin

plugin plugins

Started by Dimitris Sideris 8 years ago · 1 replies · 1008 views
8 years ago

I want to create a plugin that will override the login before the admin page.

I want the user to be redirected to the CAS server and then return back.
I am not quite sure how to do it.
Any headers for the events that I need to override and what way do you advise me to take?
What things should I look out for?
I have tried checking other login plugins but either I couldn't make them work or they were older versions.
Any help will be appreciated!!
Thanks in advance

8 years ago

Update

Included with composer jasig phpCAS package inside my plugin
used it my plugin.php using namespace \phpCAS::

Override events used:

  1. 'onUserLoginAuthenticate' (before login form)
  2. onUserLogout'

Currently my plugin works in parallel with grav's login plugin and I haven't figured out the best way to override the login plugin.
In short I want to login as admin through only my own CAS login plugin.
I tried disabling login but grav's admin plugin needs it enabled.
Is there an advisable way to do this?

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 1 day ago
2 42 19 hours ago
General · by Hanns Mattes, 1 week ago
0 123 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago