Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could take a look into Shiro: <a href="http://shiro.apache.org">http://shiro.apache.org</a> It is a very nice framework to "secure" APIs (authorization, authentication and other things for security). You can implement a "basic authentication" to "login" your users (via a username/password), then provide them with an API key, which you can use to perform a "bearer token authentication" to allow them to access the resources of your API. To do that you would define what shiro calls "filters", which are defined over API resources... this is defined in a "shiro.ini" as the following:</p> <pre><code>[main] authcBasicRealm = com.yourapp.shiro.UserAuthenticatorRealm tokenValidatorFilter = com.yourapp.shiro.BearerAuthenticationTokenFilter tokenValidatorRealm = com.yourapp.shiro.BearerAuthenticationTokenRealm [urls] /rest/hello/login/** = ssl[8443], noSessionCreation, authcBasic /rest/hello/hello = ssl[8443], noSessionCreation, tokenValidatorFilter </code></pre> <p>You need to implement/extend some of the Shiro default filters to make them work with your DB to get your user authentication data, etc. The nice thing is that they provide many tools to handle security issues, e.g.: to generate API keys, to salt and encrypt, etc. Take a look on their tutorials, they are in general very good.</p> <p>There are other frameworks, namely Java EE has support for security and also Spring provides support for security. Take a look at this very nice presentation by Mat Raible where he presents and demos these three frameworks: <a href="http://www.slideshare.net/mraible/java-web-application-security-denver-jug-2013">http://www.slideshare.net/mraible/java-web-application-security-denver-jug-2013</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload