https://github.com/marcosrachid/basic-restful-api-authentication
https://github.com/marcosrachid/basic-restful-api-authentication
java java-8 maven oauth2 rest rest-api rest-webservice spring spring-boot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/marcosrachid/basic-restful-api-authentication
- Owner: marcosrachid
- Created: 2015-12-05T00:53:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-23T05:56:41.000Z (over 9 years ago)
- Last Synced: 2025-10-29T09:43:54.446Z (8 months ago)
- Topics: java, java-8, maven, oauth2, rest, rest-api, rest-webservice, spring, spring-boot
- Language: Java
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# basic-restful-webservice
Template for REST webservice with spring
## Tecnologies
* Java 8
* Spring Boot
* Maven 3
* Release plugin
* FindBugs plugin
* JUnit
## Builds
To generate local builds with maven:
```bash
mvn clean install
```
To generate versioned builds for production and homologation enviroments:
```
mvn release:clean
mvn release:prepare
```
## Deploys
After building project, get .war file and run on your current web server:
* Tomcat
```bash
./startup.sh
```
## Oauth Token Request
Call this curl to get your access token:
```bash
curl -X POST clientIdPassword:secret@localhost:8080//basic-oauth/oauth/token -d grant_type=password -d username=john -d password=123 -d client_id=clientIdPassword
```
## Oauth Method Request
Call the curl with token like this to make use of the methods:
```bash
curl -H "Authorization: Bearer $TOKEN" localhost:8080/basic-oauth/
```