Code Monkey home page Code Monkey logo

conservationcolorado / java-oauth2-client-starter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 83 KB

🌿 Spring server written in Java to help you build an OAuth2 client application!

Home Page: https://tech.conservationco.org/blog/spring-oauth-client-with-a-test-driven-approach/

License: MIT License

Java 100.00%
guide java oauth2 oauth2-client oidc-client spring spring-boot spring-security spring-security-oauth spring-security-oauth2 template-repository oidc openid-connect

java-oauth2-client-starter's Introduction

Maven build, test, and dependency graph generation License: MIT

Welcome to java-oauth2-client-starter!

This repository is home to a Spring server written in Java to help you get started building an OAuth2 client application!

When I first implemented an OAuth2.0 client application at our organization, configuring our reactive Spring application correctly and securely took lots of time to figure out! The above guide and this repository are what I wish I had when I was doing that work.

What it does

Implements a reactive Spring OAuth client with login and logout, which will allow you to request users to authorize OpenID Connect scopes like openid, profile, email as well as OAuth2 scopes specific to your provider.

Getting started

Steps to get a copy of this repository

There are a few ways to get a copy of this repository.

  1. Using the git command in your terminal:
git clone [email protected]:ConservationColorado/java-oauth2-client-starter      # over SSH
git clone https://github.com/ConservationColorado/java-oauth2-client-starter  # over HTTPS
  1. Using the wget command in your terminal:
wget -Q https://github.com/ConservationColorado/java-oauth2-client-starter/archive/refs/heads/main.zip && unzip -q main.zip
  1. Alternatively, you can download a .zip file containing of the main branch at this link, then extract the contents with your operating system's file explorer.

Environment variables

To run the app, you'll need to supply the environment variables specified as required below. You can acquire these from your OAuth provider.

Variable Required? Description
CLIENT_ID Y Your application's client_id
CLIENT_SECRET Y Your application's client_secret

Don't forget to reference your provider's name in this line of configuration.

Dependencies

Skip this step if you've cloned this repository. These are already included in this project (view the full dependency graph at this link).

If you’re starting from scratch with start.spring.io or IntelliJ’s Spring project creator, include these dependencies:

  • Spring Reactive Web
  • Spring Security
  • Spring Security OAuth 2 Client

java-oauth2-client-starter's People

Contributors

dependabot[bot] avatar oliverabdulrahim avatar

Watchers

 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.