All Projects → membaza → users-service

membaza / users-service

Licence: Apache-2.0 license
A small microservice for managing user registrations, password changes and issue access tokens

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to users-service

reactjs-login-register-crud
ReactJS CRUD Application, ReactJS FileUpload, ReactJS Sample application, ReactJS Boilerplate, ReactJS Login, ReactJS FileUpload, ReactJS Register
Stars: ✭ 47 (+193.75%)
Mutual labels:  login, registration
Appy Backend
A user system to bootstrap your app.
Stars: ✭ 96 (+500%)
Mutual labels:  login, registration
Kratos
Next-gen identity server (think Auth0, Okta, Firebase) with Ory-hardened authentication, MFA, FIDO2, profile management, identity schemas, social sign in, registration, account recovery, and IoT auth. Golang, headless, API-only - without templating or theming headaches.
Stars: ✭ 4,684 (+29175%)
Mutual labels:  login, registration
grav-plugin-login
Grav Login Plugin
Stars: ✭ 40 (+150%)
Mutual labels:  login, login-system
youtube-dl-nas
youtube download queue websocket server with login for private NAS.
Stars: ✭ 136 (+750%)
Mutual labels:  login, login-system
single-spa-login-example-with-npm-packages
⚡ Single-spa application example which imports registered applications from NPM packages 📦 and manages authentication features as login 🔐
Stars: ✭ 98 (+512.5%)
Mutual labels:  login, login-system
Kratos Selfservice Ui React Native
A reference implementation of an app using ORY Kratos for auth (login), sign up (registration), profile settings (update password), MFA/2FA, account recovery (password reset), and more for React Native. This repository is available as an expo template!
Stars: ✭ 24 (+50%)
Mutual labels:  login, registration
Php Auth
Authentication for PHP. Simple, lightweight and secure.
Stars: ✭ 713 (+4356.25%)
Mutual labels:  login, registration
Django Rest Registration
User-related REST API based on the awesome Django REST Framework
Stars: ✭ 240 (+1400%)
Mutual labels:  login, registration
Relay Authentication
An example app demonstrating role based authentication and file upload with Relay and GraphQL.
Stars: ✭ 153 (+856.25%)
Mutual labels:  login, registration
SchoolRegistrationUI-Android
Check out the new style for App Design aims for school or colleges...😉😀😁😎
Stars: ✭ 56 (+250%)
Mutual labels:  login, registration
Brute-Force-Login
Proof -Of-Concept Brute Force Login on a web-site with a good dictionary of words
Stars: ✭ 231 (+1343.75%)
Mutual labels:  login, login-system
login-signup-form
A login and signup form using HTML, PHP, and MySQL. This form allows users to register and login. All information is stored in a MySQL database. After successful login the user is redirected to their dashboard. Project Website:
Stars: ✭ 40 (+150%)
Mutual labels:  registration, login-system
user login and register
user login and register system in django
Stars: ✭ 43 (+168.75%)
Mutual labels:  login, login-system
Userfrosting
🍩 Modern PHP user login and management framework++.
Stars: ✭ 1,547 (+9568.75%)
Mutual labels:  login, login-system
logSys
PHP Secure, Advanced Login System
Stars: ✭ 80 (+400%)
Mutual labels:  login, login-system
SuluCommunityBundle
Community features like Login, Registration, Password forget/reset for your sulu application.
Stars: ✭ 20 (+25%)
Mutual labels:  login, registration
react-signin-form
Concept for Sign in / Sign Up form
Stars: ✭ 109 (+581.25%)
Mutual labels:  login
SampleFoodBlog
🔥 Android blog application, built with Firebase
Stars: ✭ 23 (+43.75%)
Mutual labels:  login-system
LoginForKotlin
Kotlin Login demo
Stars: ✭ 37 (+131.25%)
Mutual labels:  login

users-service

A small microservice for managing user registrations, password changes and issue access tokens. Built using Spring Boot and Spring Security. User information is stored in a MongoDB database. Authentication information is passed using JWT tokens in every request, eliminating the need for a distributed token store.

Features

  • Register Users
  • Require Email Confirmation
  • Request Login / Refresh Token
  • Manage User Roles using REST
  • Update Credentials
  • Delete User
  • Expired Keys Are Automatically Purged
  • Unconfirmed Changes Are Automatically Removed

Configuration

To change the default configuration, create a file called application.properties in the same folder as the .jar-file and set any of the following options:

# Server Settings
server.port = 9465

# Application Settings
service.jwt.secret     = private_key.der
service.jwt.public     = public_key.der
service.jwt.issuer     = http://membaza.com
service.jwt.expiration = 60000

service.roles.default      = ROLE_USER
service.privileges.default =

service.purge.enabled = true

service.email.sender   = [email protected]
service.email.sitename = Membaza
service.email.siteurl  = http://membaza.com

# MongoDB Settings
spring.data.mongodb.host = localhost
spring.data.mongodb.port = 27017

# MailChimp Settings
mailgun.apiKey =
mailgun.domain = 

API Commands

The following commands are implemented by the service.

Create a new User

If an authentication token is specified and it has the CREATE_USER right, then the user is created immedietly. Otherwise, a confirmation email is sent to the specified email address with a confirmation code.

POST /users
{
    "email" : "...",
    "firstname" : "...",
    "lastname" : "...",
    "password" : "..."
}

Verify Registration

Verify the registration of an user by specifying the code sent by email.

POST /users/{userId}/verify
{
    "code" : "..."
}

Cancel Registration

The registration confirmation email was sent out by mistake. Cancel registration.

POST /users/{userId}/cancel
{
    "code" : "..."
}

Login (Request a Token)

Request a JWT authentication token.

POST /users/login 
{
    "email" : "...",
    "password" : "..."
}

Refresh Login Token

Request a new updated JWT authentication token by handing in the old (but still valid) one.

POST /users/refresh
{
    "token" : "..."
}

Logout

Tell the server to clear any cache involving the authenticated user. (This is optional).

POST /users/logout
{
    "token" : "..."
}

Assign Role

Requires the ASSIGN_ROLE_* privilege, where * is the role in question.

POST /users/{userId}/roles/{role}

Revoke Role

Requires the REVOKE_ROLE_* privilege, where * is the role in question.

DELETE /users/{userId}/roles/{role}

Delete User

Initiate deletion of user account. If an authentication token is specified and it has the DELETE_USER right, then the user is modified immedietly. Otherwise, a confirmation email is sent to the specified email address with a confirmation code.

DELETE /users/{userId}

Confirm deletion by specifying the code sent out by email:

DELETE /users/{userId}/verify
{
    "code" : "..."
}

Cancel deletion by specifying the code sent out by email:

DELETE /users/{userId}/cancel
{
    "code" : "..."
}

Change Email

Initiate email change. If an authentication token is specified and it has the MODIFY_USER right, then the user is modified immedietly. Otherwise, a confirmation email is sent to the old email address with a confirmation code.

PUT /users/{userId}/email
{
    "email" : "..."
}

Confirm email change by specifying the code sent out by email:

PUT /users/{userId}/email/verify
{
    "code" : "..."
}

Cancel email change by specifying the code sent out by email:

PUT /users/{userId}/email/cancel
{
    "code" : "..."
}

Change Password

Initiate password change. If an authentication token is specified and it has the MODIFY_USER right, then the user is modified immedietly. Otherwise, a confirmation email is sent to the email address of the user with a confirmation code.

PUT /users/{userId}/password
{
    "password" : "..."
}

Confirm password change by specifying the code sent out by email:

PUT /users/{userId}/password/verify
{
    "code" : "..."
}

Cancel password change by specifying the code sent out by email:

PUT /users/{userId}/password/cancel
{
    "code" : "..."
}

License

Copyright 2017 Emil Forslund

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].