Created
January 16, 2015 19:53
-
-
Save martinnormark/beb851d1af169fcbb89e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async Task<ZuMoLoginProviderCredentials> GetCurrentUser(this ApiController controller) | |
{ | |
ServiceUser serviceUser = controller.User as ServiceUser; | |
if (serviceUser != null) | |
{ | |
var identity = await serviceUser.GetIdentitiesAsync(); | |
var credentials = identity.OfType<ZuMoLoginProviderCredentials>().FirstOrDefault(); | |
return credentials; | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment