Apple아이디로 로그인 구현하기 - PHP 라이브러리 정보
Apple아이디로 로그인 구현하기 - PHP 라이브러리
본문
Apple IdentityToken을 확인 및 검증하고 Apple ID로 사용자를 인증하는 PHP 라이브러리.
https://github.com/AzimoLabs/apple-sign-in-php-sdk
$appleJwtFetchingService = new Auth\Service\AppleJwtFetchingService(
new Auth\Jwt\JwtParser(new \Lcobucci\JWT\Token\Parser(new \Lcobucci\JWT\Encoding\JoseEncoder())),
new Auth\Jwt\JwtVerifier(
new Api\AppleApiClient(
new GuzzleHttp\Client(
[
'base_uri' => 'https://appleid.apple.com',
'timeout' => 5,
'connect_timeout' => 5,
]
),
new Api\Factory\ResponseFactory()
),
new \Lcobucci\JWT\Validation\Validator(),
new \Lcobucci\JWT\Signer\Rsa\Sha256()
),
new Auth\Jwt\JwtValidator(
new \Lcobucci\JWT\Validation\Validator(),
[
new \Lcobucci\JWT\Validation\Constraint\IssuedBy('https://appleid.apple.com'),
new \Lcobucci\JWT\Validation\Constraint\PermittedFor('com.c.azimo.stage'),
]
),
new Auth\Factory\AppleJwtStructFactory()
);
$appleJwtFetchingService->getJwtPayload('your.identity.token');
By 웹학교
0
댓글 0개