Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c00d47
commit f0b0a2b
Showing
5 changed files
with
529 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "insomnia-plugin-openid-connect", | ||
"version": "0.0.0", | ||
"description": "An Insomnia plugin for authenticating with OpenId Connect", | ||
"main": "plugin.js", | ||
"repository": "git@github.com:alexashley/insomnia-plugin-openid-connect.git", | ||
"author": "Alex Ashley <alexashley15@gmail.com>", | ||
"license": "MIT", | ||
"private": false, | ||
"dependencies": { | ||
"joi": "14.3.1", | ||
"openid-client": "2.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const oidc = require('openid-client'); | ||
const joi = require('joi'); | ||
|
||
const schema = joi.object().keys({ | ||
clientId: joi.string().required(), | ||
// allow the clientSecret to be an empty string for public clients (e.g., mobile apps) | ||
// that said, it's not recommended for public clients to use direct access grants or the client credentials flow | ||
clientSecret: joi.string().allow('').required(), | ||
grantType: joi.string().valid('password', 'client_credentials').default('password').required(), | ||
username: joi.string().required(), // TODO: only require username/password for direct access/resource owner credentials | ||
password: joi.string().required() | ||
}); | ||
|
||
module.exports.templateTags = []; |
Oops, something went wrong.