Skip to content

gfengster/gfoauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GF Oauth2 with SpringBoot

Prerequisite Software

Install Java 1.8, Maven, git, docker.

Check out the code

Using git: git clone https://github.com/gfengster/gfoauth2.git
Download zip: https://github.com/gfengster/gfoauth2/archive/main.zip

Build and run in local machine

  1. Test, build and pack the project In a terminal, change path to the project.
    mvn clean test package
  2. Run the application
    java -jar ./target/gfoauth2.jar

Build and run docker in local machine

  1. Test, build and pack the project In a terminal, change path to the project.
    mvn clean test package
  2. Build docker image
    docker build --tag gfoauth2:latest .
  3. Run a container
    docker run -p 19090:19090 gfoauth2

CI/CD with GitHub

The project source code is hosted in GitHub. CI/CD has been configured in workflows. Changing code could trigger CI workflow, which test, build the project. If succeeded, docker image will be created and deployed to DockerHub.
CI/CD could be triggered manually.

  1. The auto built docker image location
    https://hub.docker.com/repository/docker/gfengster/gfoauth2
  2. Pull docker image built in GitHub from DockerHub
    docker pull gfengster/gfoauth2:latest
  3. Create a container and run the application
    docker run -p 19090:19090 gfengster/gfoauth2

Using the application

Note: Before run the application make sure port 19090 are free.

  1. Show my GitHub and Google login page
    http://localhost:19090
    my login page

2. Click GitHub login link. The GitHub login page will show.
![github log in](https://raw.githubusercontent.com/gfengster/gfoauth2/main/images/gitgub.png)
3. After logged in, the page will turn to ![github logged in](https://raw.githubusercontent.com/gfengster/gfoauth2/main/images/githubloggedin.png)
4. Clicking the Logout button will log out. The page in step 1 show.
5. Clicking Google login link and log in, the Google logged in page will be
![google logged in](https://raw.githubusercontent.com/gfengster/gfoauth2/main/images/googleloggedin.png)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published