Issue Type: Feature Request Feature Request
Assignee: Unassigned
Components: authentication, authorization
Created: 17/Jul/13 1:51 PM
Description:

When including the HAWK module in an CDI enabled application, currently the app needs to offer a few producers:

@Produces
    public HawkServer createHawkServer() {
        HawkServerConfiguration configuration = new HawkServerConfiguration.Builder().build();
        return new HawkServer.Builder().configuration(configuration).build();
    }
 
    @Produces
    public HawkCredentialProvider createHawkCredentialProvider() {
 
        return new HawkCredentialProvider() {
 
            @Override
            public HawkCredentials findByKey(String arg0) {
                HawkCredentials credentials = new HawkCredentials.Builder()
                    .keyId("dh37fgj492je")
                    .key("werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn")
                    .algorithm(HawkCredentials.Algorithm.SHA256)
                    .build();
                return credentials;
            }
        };
    }

We should document that somewhere on the project. A few suggestion:

  • README.md
  • JavaDoc (on HawkServer/HawkCredentialProvider)
Project: AeroGear Security
Priority: Major Major
Reporter: Matthias Wessendorf
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira