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

· 1년 전 · 429

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년 전 조회 331
1년 전 조회 414
1년 전 조회 387
1년 전 조회 373
1년 전 조회 394
1년 전 조회 311
1년 전 조회 392
1년 전 조회 395
1년 전 조회 450
1년 전 조회 374
1년 전 조회 490
1년 전 조회 455
1년 전 조회 512
1년 전 조회 462
1년 전 조회 430
1년 전 조회 468
1년 전 조회 405
1년 전 조회 595
1년 전 조회 442
1년 전 조회 442
1년 전 조회 432
1년 전 조회 421
1년 전 조회 398
1년 전 조회 440
1년 전 조회 511
1년 전 조회 381
1년 전 조회 464
1년 전 조회 403
1년 전 조회 564
1년 전 조회 438