99designs / 99designs/http-signatures-guzzlehttp

Question of header autorization

Đang mở
#13 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
13
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Bonjour,

Je dois appelé un lien avec en header une authorisation de ce fiormat :

Prenons la clé 5e1f9b461d284caf5dc0106c144e8e18 et le secret test_secret.
Considérons que l'appel est réalisé à l'heure exacte de 15h33 le 21/04/2016 :

1. Encoder "date:" et la date et heure au format UTC (les espaces doivent être remplacé par des "+" et non des "%20") :
url encoded date:Thu%2C+21+Apr+2016+13%3A32%3A18+UTC

2. Signer le résultat avec l'algorithme sha1 et du secret ci-dessus puis l'encoder en base 64 :
signature: yX9hblzfU9coVzwr4Fbdyj+UQKw=

3. Encoder la signature :
url encoded signature: yX9hblzfU9coVzwr4Fbdyj%2BUQKw%3D

4. Appeler le service avec le Header Authorization construit de la façon suivante :
Authorization: Signature keyId="5e1f9b461d284caf5dc0106c144e8e18",algorithm="hmac-sha1",signature="yX9hblzfU9coVzwr4Fbdyj%2BUQKw%3D"

Es-ce possible avec ce module ?

Merci

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.