jfoshee / ServiceStack.Authentication.Aad

Azure Active Directory Authentication plugin for ServiceStack
MIT License
20 stars 10 forks source link

Authenticate with existing access token #1

Closed chrstnbrn closed 8 years ago

chrstnbrn commented 8 years ago

I'm using your authentication provider with an ASP.NET MVC app which also uses Azure Active Directory. So I already have an access token and would like to use this token to authenticate with ServiceStack. Is this possible using the Authenticate request? If yes, how would this request look like?

jfoshee commented 8 years ago

Off the top of my head I don't think I have a one-liner to do that. I presume you need to validate that token w/ Microsoft to make sure it is good. (You might just be able to do a simple request like try fetching some demographic info). Then you might take advantage of LoadUserAuthInfo. See also the handling of the access token in the AuthProvider.

I'm sorry I couldn't be more helpful.