https://github.com/dsmith73/go-password-gen-api
password generating API written in GO
https://github.com/dsmith73/go-password-gen-api
api go password-generator
Last synced: 9 months ago
JSON representation
password generating API written in GO
- Host: GitHub
- URL: https://github.com/dsmith73/go-password-gen-api
- Owner: dsmith73
- License: mit
- Created: 2024-02-18T14:22:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T23:14:58.000Z (over 2 years ago)
- Last Synced: 2025-01-03T12:45:20.892Z (over 1 year ago)
- Topics: api, go, password-generator
- Language: Go
- Homepage: https://go-password-gen-api.onrender.com/
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-password-gen-api
This endpoint will generate a random password in GO and return a json response, which can can be of varying length and include lowercase letters, uppercase letters, numbers, and symbols. Additionally, you can choose if the first character of the password should be lowercase, uppercase, either case, a number, or any (including symbols).
## HTTP Default Request
```sh
curl -X GET http:///password/generate
```
### Sample Response
```json
{
"password": "x+z84WHb:9L"
}
```
## HTTP Declarative GET Request
`/generate/{password length}/{lowercase letters}/{uppercase letters}/{numbers}/{symbols}/{first character}`
```sh
curl -X GET http:///password/generate/17/true/true/true/false/3
```
## HTTP Declarative POST Request
`/generate`
```sh
curl -X POST -H "Content-Type: application/json" \
-d '{"length": 23, "lowercase": true, "uppercase": true, "number": true, "symbol": true, "firstLetter": 5}' \
http:///generate
```
---
## Parameters
| Parameter | Options | Default | Description |
| --- | :--- | :---: | --- |
| Length | 6 - 100 | **13** | Amount of characters the password should contain |
| Lowercase | true / false | true | Include lowercase letters |
| Uppercase | true / false | true | Include uppercase letters |
| Numbers | true / false | true | Include numbers |
| Symbols | true / false | true | Include symbols |
| First Character | **1**.Lowercase
**2**.Uppercase
**3**.Both
**4**.Number
**5**.Any | **3** | Indicate if the password should begin with a lowercase, uppercase, or either, if it should begin with a number, or if it should begin with anything, including a symbol |
---
## Example - *Numbers only*
```sh
curl -X GET http:///password/generate/9/false/false/true/false/4
```
### Sample Numbers only Response
```json
{
"password": "388146707"
}
```