From 98b36bdbd24607fbd4f1b2b1c38d1e112ca40ef0 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 12 Oct 2017 13:10:10 -0700 Subject: [PATCH 1/3] Moar whitespace This was messing up my editor's syntax highlighting --- src/core/plugins/auth/selectors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/plugins/auth/selectors.js b/src/core/plugins/auth/selectors.js index 5e84aebb..6e3b17b0 100644 --- a/src/core/plugins/auth/selectors.js +++ b/src/core/plugins/auth/selectors.js @@ -10,7 +10,7 @@ export const shownDefinitions = createSelector( export const definitionsToAuthorize = createSelector( state, - () =>( { specSelectors } ) => { + () => ( { specSelectors } ) => { let definitions = specSelectors.securityDefinitions() let list = List() @@ -27,7 +27,7 @@ export const definitionsToAuthorize = createSelector( ) -export const getDefinitionsByNames = ( state, securities ) =>( { specSelectors } ) => { +export const getDefinitionsByNames = ( state, securities ) => ( { specSelectors } ) => { let securityDefinitions = specSelectors.securityDefinitions() let result = List() @@ -64,7 +64,7 @@ export const authorized = createSelector( ) -export const isAuthorized = ( state, securities ) =>( { authSelectors } ) => { +export const isAuthorized = ( state, securities ) => ( { authSelectors } ) => { let authorized = authSelectors.authorized() if(!List.isList(securities)) { From 6cf6a85637991cf027198af7975de29c4565ad38 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 12 Oct 2017 13:10:56 -0700 Subject: [PATCH 2/3] Capture state in isAuthorized wrapAction --- src/core/plugins/oas3/auth-extensions/wrap-selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/auth-extensions/wrap-selectors.js b/src/core/plugins/oas3/auth-extensions/wrap-selectors.js index 908c92e5..3a8cac77 100644 --- a/src/core/plugins/oas3/auth-extensions/wrap-selectors.js +++ b/src/core/plugins/oas3/auth-extensions/wrap-selectors.js @@ -6,7 +6,7 @@ import { isOAS3 as isOAS3Helper } from "../helpers" // Helpers function onlyOAS3(selector) { - return (ori, system) => (...args) => { + return (ori, system) => (state, ...args) => { const spec = system.getSystem().specSelectors.specJson() if(isOAS3Helper(spec)) { return selector(...args) From a03bcbdaf470b1281481b3a3e4fbf1f20022b231 Mon Sep 17 00:00:00 2001 From: kyle Date: Thu, 12 Oct 2017 14:58:11 -0700 Subject: [PATCH 3/3] Well, it's "authorization" not "authentication". --- src/core/plugins/oas3/auth-extensions/wrap-selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/auth-extensions/wrap-selectors.js b/src/core/plugins/oas3/auth-extensions/wrap-selectors.js index 3a8cac77..973b2081 100644 --- a/src/core/plugins/oas3/auth-extensions/wrap-selectors.js +++ b/src/core/plugins/oas3/auth-extensions/wrap-selectors.js @@ -20,7 +20,7 @@ const nullSelector = createSelector(() => null) const OAS3NullSelector = onlyOAS3(nullSelector) -// Hasta la vista, authentication! +// Hasta la vista, authorization! export const shownDefinitions = OAS3NullSelector export const definitionsToAuthorize = OAS3NullSelector export const getDefinitionsByNames = OAS3NullSelector