{"id":13754173,"url":"https://github.com/rolandkrueger/user-microservice","last_synced_at":"2026-01-21T02:05:52.390Z","repository":{"id":33237717,"uuid":"36882032","full_name":"rolandkrueger/user-microservice","owner":"rolandkrueger","description":"Microservice for user account management - written with Spring Boot","archived":false,"fork":false,"pushed_at":"2015-12-13T21:06:27.000Z","size":211,"stargazers_count":52,"open_issues_count":0,"forks_count":36,"subscribers_count":14,"default_branch":"develop","last_synced_at":"2024-11-16T07:33:10.347Z","etag":null,"topics":["microservice","user"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rolandkrueger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-04T16:23:14.000Z","updated_at":"2023-09-08T16:58:21.000Z","dependencies_parsed_at":"2022-08-08T15:16:04.540Z","dependency_job_id":null,"html_url":"https://github.com/rolandkrueger/user-microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolandkrueger%2Fuser-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolandkrueger%2Fuser-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolandkrueger%2Fuser-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolandkrueger%2Fuser-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rolandkrueger","download_url":"https://codeload.github.com/rolandkrueger/user-microservice/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253335670,"owners_count":21892712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["microservice","user"],"created_at":"2024-08-03T09:01:47.053Z","updated_at":"2026-01-21T02:05:52.383Z","avatar_url":"https://github.com/rolandkrueger.png","language":"Java","funding_links":[],"categories":["user"],"sub_categories":[],"readme":"# user-microservice\nMicro-service for user account management - written with Spring Boot\n\nThis project provides a micro-service for user data management with a public RESTful interface. The RESTful API uses Spring HATEOAS for linking individual resources. By that, it is only necessary to know the service's base URL to work with it. Starting with the root document you can follow links to access the service's individual resources.    \n\nThe service can be used as a remote Spring Security user details service. It is completely stateless and can thus be used for scaling.\n \nThe service offers interfaces to register new users, confirm user registrations, and to sign in and sign off users.\n\n# Public API\n\nThis project is a multi-module Maven project divided into two sub-modules. The `service` module contains the user service itself implemented as a Spring Boot application.\n\nThe second module `public-api` provides a Java API that can be used to access the RESTful service from any Java application. This module offers an easy to use fluent API that mirrors the structure of the linked resources.\n\nFollowing are a few examples that demonstrate the service's public API.\n\n## Register a new user\n\n```\nUserServiceAPI.init(\"http://www.example.com/user-service\")\n    .userRegistrations()\n    .create(\"john.doe\", \"passw0rd\", \"john.doe@example.com\");\n```\n\n## Confirm a user registration\n\n```\nString confirmationToken = \"a3be0-23...\";\nUserServiceAPI.init(\"http://www.example.com/user-service\")\n   .userRegistrations()\n   .findByToken(confirmationToken)\n   .confirmRegistration();\n```\n\n## Find a user by user name\n\n```\nOptional\u003cUserApiData\u003e alice =\n    UserServiceAPI.init(\"http://www.example.com/user-service\")\n    .users()\n    .search()\n    .findUserForLogin(\"alice\").getData().stream().findFirst();\n```\n\n## Sign in a user\n\n```\nUserApiData alice = UserServiceAPI.init(\"http://www.example.com/user-service\")\n    .users()\n    .search()\n    .findUserForLogin(\"alice\").getData().stream().findFirst().get();\nalice.getResource().loggedIn();\n```\n\n## Update a user\n\n```\nUserApiData alice = UserServiceAPI.init(\"http://www.example.com/user-service\")\n    .users()\n    .search()\n    .findUserForLogin(\"alice\").getData().stream().findFirst().get();\nalice.setEmail(\"new.email@example.com\");\nalice.getAuthorities().add(new AuthorityApiData(\"ADMIN_ROLE\", \"\"));\n\nalice.getResource().getUpdateResource().update();\n```\n\n## Read hashed password for a user\n\n```\nString alicePasswordHash = service()\n    .users()\n    .search().findByUsername(\"alice\")\n    .getData().stream().findFirst().get()\n    .getResource()\n    .useProjection(UserProjections.FULL_DATA)\n    .read()\n    .getPassword();\n```\n\n# Open issues\n\n* Support for Remember-Me","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolandkrueger%2Fuser-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolandkrueger%2Fuser-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolandkrueger%2Fuser-microservice/lists"}