Include a php file in OJS

Hello, I have a journal in OJS, and I’m trying to add an external authentication site when you try to read an article, I have this module in php format, and I’m trying to add it to the header of my OJS site, this is possible? (would be better if I could add the authentication page just before every article) I saw that smarty can use the {include_php} argument to add a .php file but it doesn’t seem to work

The way I would approach this is to enable OJS’s subscriptions functionality, and then to write an authentication plugin against your external datasource.

What system are you wanting to authenticate against?