• Hi there,

    I configured the plugin and it works like a charm. So far :).

    I need two custom features. πŸ˜€ And I believe they might be useful to wider audience. Probably I might code both of them myself but the question is how to get them into trunk.

    1. Custom role management
    a) version simplified
    What is acceptable for me is to prevent SAML from updating user role after each login. This way I will have a distributed role management (role changes in IdP won’t be visible) but that is fine for me as current version of SAML plugin doesn’t support custom roles. This is a simple edit/comment in simulate_signon function in lib/classes/saml_client.php (line 147) or a slightly more complicated if we want to provide configuration option for that.

    b) version complex
    At the moment I believe configuration is limited to mapping standard WP roles. If I want to map for example a Woocommerce Shop Manager I cannot do that. Custom mapping functionality could be a achieved with filtering settings in update_role function in same file as above. Configuration of a complex mapping would be a little more complicated as well.

    2. Custom user attributes
    I would like to store a custom user attribute that can be provided (I hope) with SAML response. Example: phone number, company department, boss name, etc, etc. I would like to store it as a user meta field or custom field or something like that. I think this can be achieved by extending new_user function (still same file) although I have not verified if changes to some internal SAML classes. This would require slight refactoring of $login, $email, etc lines (104-108 & 119-127).

    Any way – what do you think?

    Regards,
    Piotr

    https://wordpress.org/plugins/saml-20-single-sign-on/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Piotr,

    Do you have any luck w/ your 2nd request? I am actually looking for the same thing.

    Thanks,
    Ray

    Thread Starter pburdylo

    (@pburdylo)

    Not yet, but I will be doing some research on that later on in my project and 80% I will be doing some fork of the plugin to implement that. If you come up with something in the meantime let me know :).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom role update & custom user attributes’ is closed to new replies.