I'm building an app with .Net Core 6 that will interact with a 3rd party API, and the first thing I need to do is authenticate my users against that third party. The problem is that the API doesn't implement any of the kinds of things I've seen examples for in Microsoft's documentation: no JWT, no OpenIDConnect, just - "username/password" and it responds with a custom object indicating success or failure, and that's it.
So what do I use for this kind of scenario?
CodePudding user response:
You can use any authentication implementation. Only change you need to make instead of using your database - use the 3rd party API to do the user credentials validation - In this example - Cookie Authentication on GitHub. Modify this AuthenticateUser
method - with your 3rd party API call. If the user is valid return an Application User object or return Null.