Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

CAS login plugin

plugin plugins

Started by Dimitris Sideris 7 years ago · 1 replies · 664 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 Jerry Hunt, 4 days ago
2 74 6 hours ago
General · by pamtbaau, 11 hours ago
1 47 11 hours ago
General · by Andy Miller, 23 hours ago
0 43 23 hours ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 39 5 days ago