Git Product home page Git Product logo

aap-client-java's Introduction

Java client for the EBI AAP services

This is a library with common functionality to interact with the EBI's Authentication, Authorization and Profile service.

Getting Started

Choose which aspect of the client you'd like to use:

  • security helps protect your API's endpoints via a token produced by the AAP (README).
  • service helps making calls to the AAP API (README).

Include the jar as dependency to your project (for example service with gradle):

repositories {
	maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

dependencies {
	compile( group: 'uk.ac.ebi.tsc.aap.client', name: 'service', version: '1.0.6-SNAPSHOT')
}

Configure which AAP environment to talk to

By default, the client uses our 'explore' environment, which we use as a sandbox for other parties integrating with us. To switch to another environment (for example, production https://api.aai.ebi.ac.uk), add the following properties (for ex, in your main application.properties):

If you use the service module:

aap.url=https://api.aai.ebi.ac.uk

If you use the security module:

jwt.certificate=https://api.aai.ebi.ac.uk/meta/public.der

If you happen to use both, you can re-use the URL property in the definition of the certificate property so they're always in sync:

aap.url=https://api.aai.ebi.ac.uk
jwt.certificate=${aap.url}/meta/public.der

If you would rather not read the public key dynamically on startup, you can instead download it (https://api.aai.ebi.ac.uk/meta/public.der for production), bundle it with your resources and update jwt.certificate to path/to/the/public/certificate.der.

Prerequisites

We are using this library with a few spring-boot applications, and anything with spring-security/spring-web should be easy to infer.

For building the components, you'll need to have setup a GPG signing key (for example by following the instructions of the good folks of github), and define a signatory in gradle (typically in ~/.gradle/gradle.properties):

signing.keyId=1A2B3C4D
signing.password=changeme
signing.secretKeyRingFile=path/to/secring.gpg

Note the long SHA does not seem to work (at least on windows), so use $ gpg --list-secret-keys instead, and what you need in keyId is what's in sec after the /.

It is also necessary to have defined the following variables (even if you are not using the uploadArchive task):

ossrhUsername=someone
ossrhPassword=secret

Installing

Running the tests

gradle test

Deployment

Package this library along with your application, as best relevant to your chosen dependency management system.

Built With

Versioning

We use SemVer for versioning.

aap-client-java's People

Contributors

aniewielska avatar davidrichardson avatar famaladoss avatar navisatebi avatar tfga avatar upendrakumbham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.