java REST framework servlet-based (Java REST Annotations impl), openid 2.0 relying party, oauth 1.0a consumer and service provider, json-ioc
OpenID RelyingPartyJava implementation for openid 2.0 and is backwards compatible for 1.x
Simple, lightweight and provides a clean api.
See the Quick
... [More]
Start Guide, openid wiki, source and a demo source.
Available extensions:
http://openid.net/specs/openid-attribute-exchange-1_0-05.html - See OpenIdAttributeExchange http://openid.net/specs/openid-simple-registration-extension-1_1-01.html - See OpenIdSimpleRegistration http://wiki.openid.net/f/openid_ui_extension_draft01.html - UI extension. See OpenidLoginWithoutLeavingPage http://step2.googlecode.com/svn/spec/openid_oauth_extension/latest/openid_oauth_extension.html - See Hybrid OpenID+OAuth
Supports login without leaving page using ajax/popup. See it live.
Easy deployment to google appengine(java) with default configuration. See http://dyuproject.appspot.com
Add true to your appengine-web.xml if using the default OpenIdUserManager.
Only 3 jars needed:
1. jetty-util-6.1.19.jar - 170kb
2. dyuproject-util-1.1.6.jar - 53kb
3. dyuproject-openid-1.1.6.jar - 61kb
or you can use this all-in-one jar 178kb
Upgrade to dyuproject-1.1.6 is highly recommended. This release is much more stable and contains security fixesOAuth Consumer & Service ProviderJava implementation for the latest oauth spec 1.0a - http://oauth.googlecode.com/svn/spec/core/1.0a/drafts/3/oauth-core-1_0a.html
The 1.0 spec was found to have a security issue - http://blog.oauth.net/2009/04/22/acknowledgement-of-the-oauth-security-issue/
See the OAuthConsumer wiki and OAuthServiceProvider wiki.
The signatures HMAC-SHA1 and PLAINTEXT can be used.
RSA-SHA1 (asymmetric) is currently not implemented. It is a lot more cpu-intensive compared to HMAC-SHA1 (symmetric)
Plays well with google appengine
OAuth demo is live at http://dyuproject.appspot.com
Only 3 jars needed:
1. jetty-util-6.1.19.jar - 170kb
2. dyuproject-util-1.1.6.jar - 53kb
3. dyuproject-oauth-1.1.6.jar - 45kb
or you can use this all-in-one jar 155kb
JSON IOCSmall, lightweight and fast inversion-of-control/dependency-injection alternative using json
See the wiki.
Plays well with google appengine
Only 3 jars needed:
1. jetty-util-6.1.19.jar - 170kb
2. dyuproject-json-1.1.6.jar - 13kb
3. dyuproject-ioc-1.1.6.jar - 26kb
ApplicationContext ac = ApplicationContext.load("classpath:com/acme/helloworld/application.json");
Foo foo = (Foo)ac.findPojo("foo");
System.err.println(foo.getMessage()); // Hello World
Bar bar = (Bar)ac.findPojo("bar");
System.err.println(bar.getFooList().get(0) == foo); // true
System.err.println(bar.getFooList().get(1).getMessage()); // foo!application.json
{
"message": "Hello World",
"foo":
{
"class": "com.acme.helloworld.Foo",
"message": $message
},
"bar":
{
"class": "com.acme.helloworld.Bar",
"fooList":
[
$foo,
{
"class": "com.acme.helloworld.Foo",
"message": "foo!"
}
]
}
}Lightweight servlet-based REST frameworkImplementation for Java REST Annotations. See the sample HelloWorldService.
Plays well with google appengine
Browse the rest wiki, source, simple demo source and todo-list demo source.
Live demo is at http://dyuproject.appspot.com/
Advantages:1. Simple (conforms to REST)
2. Write once (webapp and webservice in one)
3. Easy to learn (entirely based on Servlets ... near zero learning curve)
4. Naturally scalable (stateless, cookie-based session implementation similar to edge rails)
HelloWorldService.java
public class HelloWorldService extends AbstractService
{
@HttpResource(location="/")
@Get
public void root(RequestContext rc) throws IOException, ServletException
{
rc.getResponse().setContentType("text/html");
getWebContext().getJSPDispatcher().dispatch("index.jsp", rc.getRequest(), rc.getResponse());
}
@HttpResource(location="/helloworld/$")
@Get
public void helloworldEntity(RequestContext rc) throws IOException, ServletException
{
rc.getRequest().setAttribute("message", "get entity: " + rc.getPathElement(1));
rc.getRequest().setAttribute("timestamp", new Date());
rc.getResponse().setContentType("text/html");
getWebContext().getJSPDispatcher().dispatch("helloworld/index.jsp", rc.getRequest(), rc.getResponse());
}
@HttpResource(location="/helloworld")
@Get
public void helloworld(RequestContext rc) throws IOException, ServletException
{
rc.getRequest().setAttribute("message", "Hello world!");
rc.getRequest().setAttribute("timestamp", new Date());
rc.getResponse().setContentType("text/html");
getWebContext().getJSPDispatcher().dispatch("helloworld/index.jsp", rc.getRequest(), rc.getResponse());
}
@HttpResource(location="/helloworld")
@Post
public void helloworldPost(RequestContext rc) throws IOException, ServletException
{
rc.getRequest().setAttribute("message", "This is a POST request");
rc.getRequest().setAttribute("timestamp", new Date());
rc.getResponse().setContentType("text/html");
getWebContext().getJSPDispatcher().dispatch("helloworld/index.jsp", rc.getRequest(), rc.getResponse());
}
}
The maven2 repository
dyuproject-repo
dyuproject-repo
http://dyuproject.googlecode.com/svn/repos/maven2
image made with wordle [Less]