mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-23 16:54:12 +01:00
Support for OAuth 2.0 (#5)
This commit is contained in:
1 parent
d142966d0c
commit
252d23bb0e
17 files changed
+855
-52
No files matched your search
@@ -5,15 +5,15 @@ export const plugin: PluginDefinition = {
|
||||
name: 'bearer',
|
||||
label: 'Bearer Token',
|
||||
shortLabel: 'Bearer',
|
||||
config: [{
|
||||
args: [{
|
||||
type: 'text',
|
||||
name: 'token',
|
||||
label: 'Token',
|
||||
optional: true,
|
||||
password: true,
|
||||
}],
|
||||
async onApply(_ctx, args) {
|
||||
const { token } = args.config;
|
||||
async onApply(_ctx, { values }) {
|
||||
const { token } = values;
|
||||
const value = `Bearer ${token}`.trim();
|
||||
return { setHeaders: [{ name: 'Authorization', value }] };
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user