Skip to content

beercanx/oauth-api-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Rust based OAuth API

Rust CodeQL Advanced Dependabot Updates

An exercise into how to create a HTTP service using Rust, similar to oauth-api-go and oauth-api.

Requirements

Structure

├── src                     # Application source code
│   ├── token               # Shared token logic 
│   │   └── ...etc
│   ├── token_exchange      # Token exchange endpoint
│   │   └── ...etc
│   ├── token_introspection # Token introspection endpoint
│   │   └── ...etc
│   └── main.rs             # Application entry point
├── scripts
│   └── http                # Jetbrains HTTP Client requests, with assertions.
└── README.md

Building

The standard Cargo (Rust build tool) approach

cargo build

Testing

The standard Cargo (Rust build tool) approach

cargo test

Running

The standard Cargo (Rust build tool) approach

cargo run

Checking its running

Hit the token exchange endpoint with a password grant (yeah its deprecated; but it's a quick lazy way to start).

curl -vvv -X POST -H 'Content-Type: application/x-www-form-urlencoded' -u 'aardvark:badger' -d 'grant_type=password&scope=basic&username=aardvark&password=P%4055w0rd' http://127.0.0.1:8080/token

Reading materials

About

A Rust project that re-implements my OAuth project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages