Apple아이디로 로그인 구현하기 - PHP 라이브러리

· 1년 전 · 385

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');

 

 

웹학교 무료강좌 / 웹학교 컨텐츠몰 / PHP포탈

By 웹학교

|
댓글을 작성하시려면 로그인이 필요합니다.

365ok IT뉴스

+
제목 글쓴이 날짜 조회
1년 전 조회 292
1년 전 조회 367
1년 전 조회 341
1년 전 조회 332
1년 전 조회 361
1년 전 조회 274
1년 전 조회 349
1년 전 조회 347
1년 전 조회 401
1년 전 조회 328
1년 전 조회 436
1년 전 조회 412
1년 전 조회 473
1년 전 조회 415
1년 전 조회 386
1년 전 조회 426
1년 전 조회 358
1년 전 조회 541
1년 전 조회 397
1년 전 조회 409
1년 전 조회 374
1년 전 조회 382
1년 전 조회 354
1년 전 조회 400
1년 전 조회 456
1년 전 조회 341
1년 전 조회 410
1년 전 조회 336
1년 전 조회 499
1년 전 조회 373