Friday, January 20, 2012

Custom OAuth API with SpringSocial. Google OAuth2.

In my previous article I described how to begin friendship of spring-social and tapestry:
SpringSocial and Tapestry. Let's be connected.
There are 2 implementations of Twitter and Facebook templates in spring-social library. They are for OAuth1 and OAuth2 protocols respectively. But what about other APIs that also works with OAuth protocol?
Lets look on new Google OAuth 2 API. You can play with it here:
OAuth 2.0 Playground
Firstly we should decide what we need. In this article I will provide information mostly about Google user profile.

Friday, January 13, 2012

Secure application pages with tapestry5. Rethinking.

Continuing the theme started in my previous topic:
Secure application pages with tapestry5
Just rethink page security and marked some interesting moments.
Like in previous article let's imagine that we have some application with authentication and users separation by their authorities. There are also a set of allowed pages and a set of allowed actions on this pages for every such authority. So we can keep in mind such statements:

  • All security checks for pages should happen before any business logic will take effect. So this business logic will always be protected from unauthorized access and we can sleep peacefully. The best place for that in tapestry5 applications is just before page activation.
  • All security checks for page actions should happen after security checks for containing pages (as user to be authorized for page action should also be authorized for page containing this action) and before any business logic will take effect.
Let's start with page security.