Code Monkey home page Code Monkey logo

go-password-gen-api's Introduction

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

curl -X GET http://<base url>/password/generate

Sample Response

{
    "password": "x+z84WHb:9L"
}

HTTP Declarative GET Request

/generate/{password length}/{lowercase letters}/{uppercase letters}/{numbers}/{symbols}/{first character}

curl -X GET http://<base url>/password/generate/17/true/true/true/false/3

HTTP Declarative POST Request

/generate

curl -X POST -H "Content-Type: application/json" \
	-d '{"length": 23, "lowercase": true, "uppercase": true, "number": true, "symbol": true, "firstLetter": 5}' \
	http://<base url>/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

curl -X GET http://<base url>/password/generate/9/false/false/true/false/4

Sample Numbers only Response

{
    "password": "388146707"
}

go-password-gen-api's People

Contributors

dsmith73 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.