The option doesn´t work in latest released version.
I´ve tried direct request OAuth token and imbedded RabbitMQ provider. In both cases when I used OAuth token for technical user with role “Coordinator” I received error from the AMQP broker:
ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
Just tested it again on prod. Still working
Maybe this snippet helps you:
const token = await createToken()
const exchange = `project.${process.env.PANTARIS_PROJECT_ID}`
const connection = await amqp.connect({
hostname: 'data-events.pantaris.io',
port: 5672,
vhost: '/protected/',
protocol: 'amqp',
username: `Bearer ${token}`,
})
The createToken
- function returns an access-token from the broker using the client-credentials flow and the scope pantaris:api-v2
.
If you still facing issues, create a support ticket and provide details on your configuration and implementation.
Hello Thomas,
Thanks, using the prefix "Bearer " solved the problem.