I’m trying to use Atlassian’s Provider functionality to authenticate with PagerDuty. It looks like by and large it will work except the Profile portion.
PagerDuty exposes the /users/me
endpoint on their normal API, except this endpoint will return a 404 if it doesn’t receive the correct Accept header. This appears to block me from using PagerDuty via this method.
Example below:
providers:
auth:
- key: pagerduty
name: PagerDuty
remotes:
- pd-app
- pd-api
scopes:
- email
- read
type: oauth2
clientId: c3c8de03-6190-4182-9412-9996df4b59b8
bearerMethod: authorization-header
actions:
authorization:
remote: pd-app
path: /global/oauth/authorize
exchange:
remote: pd-app
path: /global/oauth/token
revokeToken:
remote: pd-app
path: /global/oauth/revoke
retrieveProfile:
remote: pd-api
path: /users/me
resolvers:
id: user.id
name: user.email
avatarUrl: user.avatar_url
remotes:
- key: pd-app
baseUrl: https://app.pagerduty.com
- key: pd-api
baseUrl: https://api.pagerduty.com