Created
June 21, 2012 08:25
-
-
Save sandrinodimattia/2964576 to your computer and use it in GitHub Desktop.
Rendering e-Contract photo
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