Using Ocelot for Custom Authentication using saml2 #1991
Replies: 1 comment
-
Hello, @saurabh-singh-39 !
Sure thing! Because we don't recommend to override
Great! Why do you override
Are you student? |
Beta Was this translation helpful? Give feedback.
-
I am trying to use ocelot to configure a custom authentication. So, whenever a user tries to access a route configured as authenticated in ocelot, I want ocelot to invoke the saml2 authentication scheme which is registered as a "forward challenge" which takes user to my custom login page. From there user can login and if it is successful, it comes back to the home page. Strangely, Ocelot looks for authentication in this case but does not fire saml2 authentication.
As a solution, I tried to override the authentication middleware of ocelot through middleware injection as provided in this documentation - https://ocelot.readthedocs.io/en/latest/features/middlewareinjection.html.
But, when I am trying to run the app after this override, I am getting an "Object Null Reference Exception" . I looked for various documentations and tutorials but there are no examples for how to override the authentication middleware. Following is my code for overriding
Beta Was this translation helpful? Give feedback.
All reactions