CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of authentication
C#
protected void Page_Load(object sender, EventArgs e)
{
    if (HttpContext.Current.Request.IsAuthenticated)
    {
        ResetFormsAuthenticationTicket();
    }
    else
    {
        Response.Redirect("~/logout.aspx");
    }
by Kent   January 22, 2012 @ 7:26pm
43 Views
no comments
 
C#
public class AccountController : Controller
{
 
    public IFormsAuthenticationService FormsService { get; set; }
    public IMembershipService MembershipService { get; set; }
    private ITokenAuthentication tokenAuthentication;
 
    public AccountController(ITokenAuthentication tokenAuthentication)
    {
        this.tokenAuthentication = tokenAuthentication;
by Fernando Claverino   April 03, 2011 @ 3:18pm
196 Views
no comments
 
C#
public interface ITokenAuthentication
{
    string Login(string token);
}
 
 
public class JanRainAuthentication : ITokenAuthentication
{
    private string apiKey;
    private string baseUrl;
by Fernando Claverino   April 03, 2011 @ 3:13pm
222 Views
no comments
 
C#
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();
by nobodybutca   August 31, 2010 @ 9:05pm
183 Views
no comments
 
C#
private FacebookSession CreateSessionFromSignedRequest(FacebookSignedRequest signedRequest)
        {
            if (signedRequest == null || string.IsNullOrEmpty(signedRequest.AccessToken))
            {
                return null;
            }
 
            FacebookSession tempSession = new FacebookSession
            {
                UserId = signedRequest.UserId,
by Patrick Snape   August 26, 2010 @ 2:08am
1888 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate