Add support for SASL Kerberous realms. Closes #114
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 33s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m39s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 33s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m39s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
This commit is contained in:
parent
cad0a11bd2
commit
673f070cb7
19
app/Classes/LDAP/Attribute/Password/SASL.php
Normal file
19
app/Classes/LDAP/Attribute/Password/SASL.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\LDAP\Attribute\Password;
|
||||
|
||||
final class SASL extends Base
|
||||
{
|
||||
public const key = 'SASL';
|
||||
|
||||
public function encode(string $password): string
|
||||
{
|
||||
if (! str_contains($password,'@'))
|
||||
return '';
|
||||
|
||||
// Ensure our id is lowercase, and realm is uppercase
|
||||
list($id,$realm) = explode('@',$password);
|
||||
|
||||
return sprintf('{%s}%s@%s',self::key,strtolower($id),strtoupper($realm));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user