Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

CAS login plugin

plugin plugins

Started by Dimitris Sideris 7 years ago · 1 replies · 887 views
7 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

7 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 jeremycherfas, 1 week ago
5 199 9 hours ago
General · by lynbor, 6 days ago
2 131 3 days ago
General · by Old Man Umby, 1 week ago
1 106 1 week ago
General · by Sebastian, 2 weeks ago
1 131 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 252 3 weeks ago