We are exciting to announce a new service release of EasyOAuth Framework 2.0 named SP1 (Service Pack 1). This release provides the following new feature:

1. Service Invocation method

In EasyOAuth Framework v1.0, we released a method named "Invoke" to developer for method call of service provider, but we removed it temporary in 2.0 with some issues. In this release, we added this method into OAuthDesktopClient and OAuthWebClient (include V1 and V2), you can use it like the following code:

EasyOAuth.Core.OAuthDesktopClientV2 client =

client.Invoke("https://graph.facebook.com/me", "GET", new NameValueCollection());

You can invoke any APIs via client object with access token, we also release 2 (two) methods to developer to load exist access token in OAuthClientContext in Web Application scenario:

public static OAuthClientContext CreateWithAccessToken(OAuthWebClientV1 client, string AccessToken, string TokenSecret)
    client.SetAuthorizedInformation(AccessToken, TokenSecret);
    return new OAuthClientContext(client);

public static OAuthClientContext CreateWithAccessToken(OAuthWebClientV2 client, string AccessToken)
    return new OAuthClientContext(client);

Desktop application can use "SetAuthorizatedInformation()" to set exist access token to client object and invoke service method.

2. Authentication Status Persistence

In some Web application scenario, we may experience the session lost issue during OAuth authentication and authorization process, so we added a "status persistence" service in Web application, you can enable it by adding the following configuration in Web.config file:

    <section name="oauth.statuspersist"
      type="EasyOAuth.WebUtility.Configuration.Configuration.OAuthStatusPersistConfigurationSection, EasyOAuth.WebUtility" />
   <oauth.statuspersist type="Database" connectionString="initial catalog=[YOUR_DATABASE_CONNECTION_STRING" />

We have 2 mode for status store: Session or Database, if you select "Session", you can keep the blank in connectionString field; if you select "Database", you must configure connection string to your database, and create a table named OAuthSessionStates:

CREATE TABLE [dbo].[OAuthSessionStates](
	[IPAddress] [varchar](12) NOT NULL,
	[Version] [tinyint] NOT NULL,
	[ConfigurationName] [varchar](50) NOT NULL

EasyOAuth Framework will use database to store status during OAuth process.

NOTE: Currently, we just support SQL Server provider only.

3. Loading Profile

We added profile loading feature into each implementation of service provider, we load "name", "email" and "id" for default, but email will be blank if service provider has no information (like Twitter and LinkedIn).

Developer can use "LoadProfile()" method to load user's default profile, or handling "ProfileRequested" event to obtain more information.

4. Events (Desktop Edition only)

We added the events into OAuth process's methods for developer to do something, the events are:

1. TokenRequested (OAuth V1 only)
2. VerifierRequested (OAuth V1 and V2)
3. AccessTokenRequested (OAuth V1 and V2)
4. ServiceMethodInvoked (OAuth V1 and V2)
5. ProfileRequested (OAuth V1 and V2)

ProfileRequested event will provide the raw data loaded by "LoadProfile()" method, developer can use it to get other information.

Last edited Dec 23, 2011 at 7:16 AM by regionbbs, version 4


No comments yet.