All Projects → qihaiyan → Ng Boot Oauth

qihaiyan / Ng Boot Oauth

Licence: mit
oauth2 demo with angularjs and springboot

Projects that are alternatives of or similar to Ng Boot Oauth

Spring Boot Angular4 Boilerplate
Quickstart for spring boot + angular 4 projects
Stars: ✭ 151 (+52.53%)
Mutual labels:  webpack, gradle, spring-boot
Web Framework For Java
A seed project with spring boot for AngularJS, AngularJs Material, Thymeleaf, RESTful API, MySQL and admin panel based on AdminLTE.
Stars: ✭ 29 (-70.71%)
Mutual labels:  spring-boot, oauth, angularjs
21 Points
❤️ 21-Points Health is an app you can use to monitor your health.
Stars: ✭ 244 (+146.46%)
Mutual labels:  webpack, gradle, spring-boot
Spring Streaming
SPA on Spring Boot 1.x, WebSockets and React, gradle, nodejs, spring-boot, gradle multi project, spring-mvc, spring-data, gradle dependency update plugin, react-router
Stars: ✭ 6 (-93.94%)
Mutual labels:  webpack, gradle, spring-boot
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-54.55%)
Mutual labels:  spring-boot, oauth
Pacbot
PacBot (Policy as Code Bot)
Stars: ✭ 1,017 (+927.27%)
Mutual labels:  spring-boot, angularjs
Sample Boot Hibernate
Spring Boot + JPA ( Hibernate ) + Java8 [ DDD Sample ]
Stars: ✭ 97 (-2.02%)
Mutual labels:  gradle, spring-boot
Spring Vue Sample
Stars: ✭ 69 (-30.3%)
Mutual labels:  webpack, spring-boot
Starling Api Web Starter Kit
Starter kit and example app for using the Starling API.
Stars: ✭ 46 (-53.54%)
Mutual labels:  webpack, oauth
Cas Gradle Overlay Template
CAS Gradle Overlay: Generic CAS gradle war overlay to exercise the latest versions of CAS
Stars: ✭ 69 (-30.3%)
Mutual labels:  gradle, spring-boot
Component Pattern For Angular Js 1 X
Example of implementation of Component pattern for Angular JS 1.X using ES6 & Webpack
Stars: ✭ 75 (-24.24%)
Mutual labels:  webpack, angularjs
Depli
A handsome JVM monitoring dashboard
Stars: ✭ 39 (-60.61%)
Mutual labels:  spring-boot, angularjs
Soqlbuilder
Node.js and AngularJs based Query Builder for Salesforce using OAuth2 and REST API
Stars: ✭ 37 (-62.63%)
Mutual labels:  oauth, angularjs
Klask Io
klask.io is an open source search engine for source code, live demo
Stars: ✭ 45 (-54.55%)
Mutual labels:  spring-boot, angularjs
Tested
Angular Material in MEAN Stack Website Source
Stars: ✭ 35 (-64.65%)
Mutual labels:  webpack, angularjs
Microservices Example
Example of a microservices architecture on the modern stack of Java technologies
Stars: ✭ 66 (-33.33%)
Mutual labels:  gradle, spring-boot
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-25.25%)
Mutual labels:  gradle, spring-boot
Angular2 Demo
A simple demo for Angular 2
Stars: ✭ 77 (-22.22%)
Mutual labels:  webpack, angularjs
Hex Arch Kotlin Spring Boot
Reference JVM multi module project for a reactive micro service and lambda using a hexagonal architecture, DDD, Kotlin, Spring Boot, Quarkus, Lambda, Gradle.
Stars: ✭ 83 (-16.16%)
Mutual labels:  gradle, spring-boot
Login Sample
A simple Android app that allows users to sign up / login / logout.
Stars: ✭ 28 (-71.72%)
Mutual labels:  gradle, spring-boot

ng-boot-oauth

中文介绍

An oauth2 demo with angularjs and springboot.

Default username is admin, and password is 111111.

1. Features

Modules

The project contains 3 modules

  • authserver
  • ui (A client using oauth2 code flow)
  • ui-implicit (A client using oauth2 implicit flow, with a standalone frontend module)

Frontend

  • ES6
  • AngularJs 1.x
  • webpack dev server reload (by inserting a web-dev-server script into index.html when the environment is set to DEV )
<% if (webpackConfig.metadata.ENV === 'dev') { %>
<!-- webpack dev server reload -->
<script src="http://<%= webpackConfig.metadata.host %>:<%= webpackConfig.metadata.port %>/webpack-dev-server.js"></script>
<!-- end webpack dev server reload -->
<% } %>

Backend

  • Gradle Build Tool
  • Spring Boot
  • Spring security Oauth2 integration
  • Thymeleaf server-side Java template engine

2. RUNNING IN DEVELOPMENT MODE

Note that ui module and ui-implicit module can't be running at the same time, because they use the same port 8080.

GET THE CODE

git clone https://github.com/qihaiyan/ng-boot-oauth.git
cd ng-boot-oauth

RUNNING OAuth2 Server

cd authserver
./gradlew bootRun

RUNNING ui MODULE

cd ui
./gradlew bootRun

Now we can visit the app at http://localhost:8080

RUNNING ui-implicit MODULE

  • RUNNING BACKEND SERVER
cd ui-implicit
./gradlew bootRun

If it's the first time to run ui-implicit module, install dependencies at first.

cd ui-implicit
npm install
  • RUNNING DEV SERVER
cd ui-implicit
npm run dev
  • CORS

We use the following configuration for dev-server in webpack.config.js to avoid the CORS error. And the proxies for api calls can also be configured here.

devServer: {
            port: 3000,
            contentBase: './src/main/frontend',
            headers: {
                'Access-Control-Allow-Origin': 'http://localhost:8080',
                'Access-Control-Allow-Credentials': 'true',
                'Access-Control-Allow-Headers': 'authorization',
                'Access-Control-Allow-Methods': 'GET'
            },
            // proxy: {
            //     '/user': 'http://localhost:8080/'
            // },
        },

Now we can visit the app at http://localhost:8080

3. RUNNING IN PRODUCTION MODE

Compile and package project:

gradle build

Then run auth server:

cd authserver/
java -jar ./build/libs/ng-boot-oauth-0.0.1.jar

Then run ui server:

cd ui/
java -jar ./build/libs/ng-boot-oauth-ui-0.0.1.jar

Or run ui-implicit server:

cd ui-implicit/
java -jar ./build/libs/ng-boot-oauth-ui-implicit-0.0.1.jar

Now we can visit the app at http://localhost:8080

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].