Giter Club home page Giter Club logo

idam-java-client's Introduction

Idam java client

Build Status Download

This is a client library for interacting with the idam application.

Getting started

Prerequisites

Usage

Add the library as a dependency of your project and configure the spring application to scan for Feign clients in the uk.gov.hmcts.reform.idam package:

@EnableFeignClients(basePackages = {"uk.gov.hmcts.reform.idam"})
public class YourSpringApplication { }

You will also need to set the spring configuration property of idam.api.url

Optionally if you are authenticating a user you can use provide client configuration:

idam:
  api:
    url: http://localhost:8080
  client:
    id: client_id
    secret: 123456
    redirect_uri: https://localhost:3000/receiver 

A client (IdamClient) is provided for interacting with the IdamApi feign client to simplify the log in flow:

@Service
class UserService {
    private final IdamClient idamClient;
    
    UserService(IdamClient idamClient) {
        this.idamClient = idamClient;
    }
    
    public UserDetails authenticateUser(String username, String password) {
        return idamClient.authenticateUser(username, password);
    }
    
}

Components provided by this library will get automatically configured in a Spring context if idam.api.url configuration property is defined and does not equal false.

Building

The project uses Gradle as a build tool but you don't have install it locally since there is a ./gradlew wrapper script.

To build project please execute the following command:

    ./gradlew build

Developing

Coding style tests

To run all checks (including unit tests) please execute the following command:

    ./gradlew check

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

idam-java-client's People

Contributors

adusumillipraveen avatar alexwakeman avatar cakeben avatar danhamilton avatar dependabot-preview[bot] avatar dependabot[bot] avatar doncem avatar faisalmoj avatar jburke-idam avatar jordanhoey96 avatar kevinjcross avatar lgonczar avatar linusnorton avatar msl8r avatar nitinprabhu avatar renovate[bot] avatar sahitya-desireddy avatar smathangi avatar timja avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idam-java-client's Issues

Surname is never returned by #retrieveUserDetails method

What would you like to change?

Since release of 1.2.0 IdamApi#retrieveUserDetails does not return user surname.

Most likely @JsonIgnore in the following place is the issue: https://github.com/hmcts/idam-java-client/pull/36/files#diff-050d7fc39b75312fa3594f44bf35bb67R43.

How do you think that would improve the project?

Surname should not be excluded.

If this entry is related to a bug, please provide the steps to reproduce it

Call IdamApi#retrieveUserDetails to retrieve details of an existing user that has surname set.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/changelog.yml
  • release-drafter/release-drafter v6
.github/workflows/gradle.yml
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/jitpack_build.yml
  • actions/checkout v4
gradle
settings.gradle
build.gradle
  • io.spring.dependency-management 1.1.6
  • org.springframework.boot 3.2.0
  • com.github.ben-manes.versions 0.51.0
  • se.patrikerdes.use-latest-versions 0.2.18
  • org.owasp.dependencycheck 10.0.4
  • au.com.dius.pact 4.6.14
  • checkstyle 10.18.1
  • org.springframework.cloud:spring-cloud-starter-openfeign 4.1.3
  • io.github.openfeign:feign-jackson 13.3
  • io.github.openfeign:feign-httpclient 13.3
  • org.projectlombok:lombok 1.18.34
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.springframework.cloud:spring-cloud-contract-wiremock 4.1.4
  • au.com.dius.pact.consumer:junit5 4.6.14
  • net.serenity-bdd:serenity-core 4.0.29
  • net.serenity-bdd:serenity-junit 4.0.29
  • net.serenity-bdd:serenity-rest-assured 4.0.29
  • net.serenity-bdd:serenity-spring 4.0.29
  • io.jsonwebtoken:jjwt 0.12.6
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.10.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.