Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security does not work when using basic security #139

Open
muysewinkel opened this issue Mar 2, 2018 · 0 comments
Open

Security does not work when using basic security #139

muysewinkel opened this issue Mar 2, 2018 · 0 comments

Comments

@muysewinkel
Copy link

HI I'm trying to get basic security working.

I started with the following security definition:

securityDefinitions:
  UserSecurity:
    type: basic
    #in: header
    #name: X-Access-Token
    x-authorize: security/userSecurity.js

and in the path I added:

security:
    - UserSecurity: []

If I try to access this path, I see that it fails if (thing.isFunction(security[type].authorize)) {

At this point my security type does not contain an authorize function

I tried adding the lines as described in the documentation

#
# Security
#
securityDefinitions:
  UserSecurity:
    type: basic
    x-authorize: /security/userSecurity.js
    scopes:
    - user:all

This does not work because scopes is not allowed for basic

#
# Security
#
securityDefinitions:
  UserSecurity:
    x-authorize: /security/userSecurity.js
    scopes:
    - user:all

This does not work because type is mandatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant