OpenID: Trying to Get Email Address from Google OP

Ok figured it out. I posted a question on Goolge’s Federated Log API group and was told to use Attribute exchange. Below is the code for DotNetOpenAuth. Please don’t use this code in production. This is for illustration purposes only! The Request: using (OpenIdRelyingParty openid = new OpenIdRelyingParty()) { IAuthenticationRequest request = openid.CreateRequest(openidurl); var fetch … Read more

How does OpenID authentication work?

What is OpenID? OpenID is an open, decentralized, free framework for user-centric digital identity. OpenID takes advantage of already existing internet technology (URI, HTTP, SSL, Diffie-Hellman) and realizes that people are already creating identities for themselves whether it be at their blog, photostream, profile page, etc. With OpenID you can easily transform one of these … Read more

Securing my REST API with OAuth while still allowing authentication via third party OAuth providers (using DotNetOpenAuth)

First I’d like to emphasize the difference between authentication and authorization: A user authenticates to your web site by supplying some credential such as a username+password. OpenID allows this to be displaced by having the user authenticate to another service, which then asserts the user’s identity to your web site on the user’s behalf. Your … Read more

How to get Uri.EscapeDataString to comply with RFC 3986

Having not been able to get Uri.EscapeDataString to take on RFC 3986 behavior, I wrote my own RFC 3986 compliant escaping method. It leverages Uri.EscapeDataString, and then ‘upgrades’ the escaping to RFC 3986 compliance. /// <summary> /// The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. /// … Read more

Changing the action of a form with JavaScript/jQuery

jQuery (1.4.2) gets confused if you have any form elements named “action”. You can get around this by using the DOM attribute methods or simply avoid having form elements named “action”. <form action=”foo”> <button name=”action” value=”bar”>Go</button> </form> <script type=”text/javascript”> $(‘form’).attr(‘action’, ‘baz’); //this fails silently $(‘form’).get(0).setAttribute(‘action’, ‘baz’); //this works </script>

Does OpenID Connect support the Resource Owner Password Credentials grant?

Yes, OpenID Connect supports all OAuth 2.0 grant types including Resource Owner Password Credentials Grant and Client Credentials Grant. As we know, Authorization Code Grant and Implicit Grant are typical 3-legged flows including interaction between a client, an authorization server and a user. While the Resource Owner Password Credential Grant and Client Credential Grant are … Read more

Steam API Authentication

There is a need for OpenID. That’s the method that Valve uses according to their documentation. You don’t mention what your application is written in, so I can only guess that you are doing this via a web page. In that case, I recommend using the LightOpenID library. From there, this sample code should be … Read more