Replies: 2 comments 3 replies
-
Where in netbox a Bearer used? I did a quick code search and nothing came up |
Beta Was this translation helpful? Give feedback.
1 reply
-
It's not native to netbox, a plugins have to be added to use a bearer token with netbox (In our organisation, we added it). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
For Oauth2 authorization, we need to pass a token type Bearer instead of Token.
Would it be possible to add an argument 'token_type' that will be 'Token' by default, that permit to change the token type used in http headers.
The changes to make seem simple.
In the file /pynetbox/core/query.py
1 - add an argument token_type (with default value to Token)
2 - change all lines (lines 208 & 232)
with
A check could also be done for the type of token given (should be Token or Bearer ).
For information, I also ask to make this change to Ansible netbox module. The changes have been implemented.
https://github.com/netbox-community/ansible_modules/blob/devel/plugins/inventory/nb_inventory.py
Thanks a lot,
P. Morry
Beta Was this translation helpful? Give feedback.
All reactions