Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert Ghafoor 33 posts 95 karma points
    Aug 17, 2021 @ 13:37
    Robert Ghafoor
    0

    How to set OwinContext.Environment for a custom middleware

    Im trying to implament saml ldp backoffice logins and im using "Sustainsys.Saml2.Owin" as a owin middleware this package require that you set the "saml2.idp" key: https://saml2.sustainsys.com/en/stable/owin-middleware.html

    I can however not figure out how to do this in Umbraco there is no way to get the actual OwinContext and set the key value even if i use GetOwinContext it throws "No envioment is found..." error.

    this is what i have so far to configure it using the open source test connector https://gist.github.com/robgha01/4409f5b0910c0b91d2360e64fd769fd1

  • Robert Ghafoor 33 posts 95 karma points
    Aug 17, 2021 @ 20:04
    Robert Ghafoor
    0

    Found a way to set it now BackOfficeExternalLoginProviderOptions.OnChallenge this function can return null if you want to stick with the default properties and its possible to do context.Set("saml2.idp", new EntityId("xxx")); now i just have to figure out the rest.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies