Format:
Recent snippets matching tags of authentication
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Request.IsAuthenticated) { ResetFormsAuthenticationTicket(); } else { Response.Redirect("~/logout.aspx"); }
43 Views
no comments
public class AccountController : Controller { public IFormsAuthenticationService FormsService { get; set; } public IMembershipService MembershipService { get; set; } private ITokenAuthentication tokenAuthentication; public AccountController(ITokenAuthentication tokenAuthentication) { this.tokenAuthentication = tokenAuthentication;
196 Views
no comments
public interface ITokenAuthentication { string Login(string token); } public class JanRainAuthentication : ITokenAuthentication { private string apiKey; private string baseUrl;
222 Views
no comments
protected void Button2_Click(object sender, EventArgs e) { string uri = "http://quality.osm.no"; Uri weburi = new Uri(uri, false); StringBuilder sbuild = new StringBuilder(); string temp = ""; try { HttpWebRequest webrequest = (HttpWebRequest) WebRequest.Create(weburi); CredentialCache myCache = new CredentialCache();
183 Views
no comments
private FacebookSession CreateSessionFromSignedRequest(FacebookSignedRequest signedRequest) { if (signedRequest == null || string.IsNullOrEmpty(signedRequest.AccessToken)) { return null; } FacebookSession tempSession = new FacebookSession { UserId = signedRequest.UserId,
1888 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
