NOTE: For php <=7.1 see v1.0
This package only provides a function to encode an Object Guid to base64.
Microsoft azure immutable id is an encoding of the Object Guid to base64. but if you tray to encode
the object guid directly it will preduse a not acceptable value or incorrect to the immutable id in microsoft azure. see example below
echo base64_encode("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
// output is "N2VhMmUyMmYtMzFjYi00Yzk3LTg5ZWItMWI0NTAxYWFmZTQw"
So this packge solves the problem.
composer require abublihi/guid-to-base64
use Abublihi\Guid\ToBase64;
$toBase64 = new ToBase64("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
echo $toBase64->getBase64(); // output "L+Kifssxl0yJ6xtFAar+QA=="
use Abublihi\Guid\ToBase64;
echo ToBase64::encode("748b2d72-706b-42f8-8b25-82fd8733860f"); // output "ci2LdGtw+EKLJYL9hzOGDw=="
This package deeply depends on ramsey/uuid
package.
Azure AD Connect: Design concepts
- Thanks to
Martijn Pieters
for the discussion in discuss.python.org. - @almodhfer Thank for helping me.