ServiceNowITOM / servicenow-ansible

22 stars 28 forks source link

ISSUE 27 Support OpenID Connect protocol #47

Closed n3pjk closed 3 years ago

n3pjk commented 3 years ago

Converted ServiceNowClient to an extension of AnsibleModule. 'auth' must be specified if connecting using any protocol other than 'Basic'. Now supports bearer tokens and OpenID Connect, in a fully extensible manner that is separate from pysnow. OpenID tokens are reused over their lifetime, and the code accounts for time drift between requester and the token provider.

n3pjk commented 3 years ago

I added 'requests' to requirements.txt. Is there something else I need to do to let the checker know it needs to install the requests module?

gundalow commented 3 years ago

@n3pjk Good work on getting CI green @felixfontein Thank you for the pointers with this

n3pjk commented 3 years ago

Yes, thanks for all the help! Please note the code was refactored to inherit from AnsibleModule, and named ServiceNowModule.

willtome commented 3 years ago

@n3pjk are you ready for merge?

n3pjk commented 3 years ago

Yes. It is ready to merge. I have tested it in both snow_record and _find. It's looking very solid.

willtome commented 3 years ago

Great! Can you please add a changelog fragment including one of the sections from https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/changelog.html and then it will be ready for merge.

n3pjk commented 3 years ago

Added 27_openid.yml fragment. Let me know if there's anything else needed.