Authen::SASL::Perl::OAUTHBEARER(3) User Contributed Perl Documentation Authen::SASL::Perl::OAUTHBEARER(3)

Authen::SASL::Perl::OAUTHBEARER - OAUTHBEARER Authentication class

version 2.2000

use Authen::SASL qw(Perl);
$sasl = Authen::SASL->new(
  mechanism => 'OAUTHBEARER',
  callback  => {
    user => $user,
    host => $hostname, #optional
    port => $port, #optional
    pass => $access_token
  },
);

This module implements the client side of the OAUTHBEARER SASL mechanism, which is used for OAuth 2.0-based authentication.

The callbacks used are:

Client

The username to be used for authentication.
The hostname to which the client will connect to. It is optional and can be omitted.
The destination port that the client will connect to. It should be a decimal positive integer string without leading zeros. It is optional and can be omitted.
The OAuth 2.0 access token to be used for authentication.

Authen::SASL, Authen::SASL::Perl

Written by Aditya Garg and Julian Swagemakers.

Copyright (c) 2025 Aditya Garg.

Copyright (c) 2025 Julian Swagemakers.

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2026-01-31 perl v5.42.0