Forums | Mahara Community

Developers /
Auth Plugin display name


Jimmy King's profile picture
Posts: 4

08 March 2010, 5:40 AM

Hello

I'm trying to create my own auth module based on the SAML code.  I got a display problem when I first create an instance on the institution screen. 

 When I try to add an instance, it shows the popup for config parameters which looks good.  Then when I click Submit, there is one entry added to the Authentication plugin list, but with no name.  The up arrow and cross icons are there though.  When I save this institution setting and come back again, it can show the name normally and works ok afterwards for editting.

I guess I missed something in the save_config_option function?  I have a 'authname' field in the $values array which is returned at the end.

Thanks for any help in advance.

Jim

Penny Leach's profile picture
Posts: 228

15 March 2010, 1:44 PM

Hi Jimmy

can you paste the relevant code here?  You can also live-debug using the log_debug etc functions (depending on the log targets you have set in config.php)

Jimmy King's profile picture
Posts: 4

18 March 2010, 4:41 AM

Hi Penny,

Thanks for your reply.   I think I got it - the SAML code has this issue as well.  The  "instancename" was never initialized in the class nor is it in the default $elements array, causing it null and hence the display issue for the first time it is created.  Could be a bug?

Could you share more on the debug options that can be set in config.php?  I didn't realize the debug function and looks like it could help a lot.

 

Jim

 

Penny Leach's profile picture
Posts: 228

18 March 2010, 5:36 AM

It could be a bug. You'd have to ask Piers, he wrote the SAML plugin.

About the log targets.  There are various different log_ methods depending on what level. log_debug, log_info, log_warn and log_environ.  Then there are corresponding log targets, which is what is set in config.php.  They are a bitmask of where you want the different levels to go, eg LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG.

Hope that helps :)

Jimmy King's profile picture
Posts: 4

18 March 2010, 6:14 AM

Great info, thanks!  I'll try.

 

Jim

5 results