Created
July 20, 2012 22:08
-
-
Save sandrinodimattia/3153597 to your computer and use it in GitHub Desktop.
Return Photo Result
This file contains hidden or 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 ActionResult Photo() | |
{ | |
var photo = GetClaims().FirstOrDefault(o => o.ClaimType == "be:fedict:eid:idp:photo"); | |
if (photo != null) | |
{ | |
var stream = new MemoryStream(Convert.FromBase64String(photo.Value)); | |
return new FileStreamResult(stream, "image/jpg"); | |
} | |
else | |
{ | |
return new EmptyResult(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment