Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

Resource is not available at token.services.mozilla.com

  • 2 réponses
  • 1 a ce problème
  • 6 vues
  • Dernière réponse par Pushi

more options

I try to get token from token server to access sync storage 1.5. This how i build my browserid assertion:

{
    header = {alg: 'RS256'}
    claims = {aud: 'https://token.services.mozilla.com', exp: now + (60 * 5)}

    body = base64(header) + '.' + base64(claims)
    signature = token + '.' + rsa_encrypt_on_private_key(base64(token))

    assertion = certificate + '~' + signature
}

Certificate has my public key. I get it from auth server.

After that i try to send request

request( 'GET', 'https://token.services.mozilla.com/1.0/sync/1.5')

with Authorization header:

BrowserID <assertion>

I think server recognize me, because it response me not with Unauthorized header, but i get error:

{"status": "error", "errors": [{"location": "body", "name": "", "description": "Resource is not available"}]}

How can i resolve this problem? Please, i spent so much time on it. Need help. At least tell me is my assertion generation algorithm correct and if not can somebode show how it should be?

I try to get token from token server to access sync storage 1.5. This how i build my browserid assertion: <pre><nowiki>{ header = {alg: 'RS256'} claims = {aud: 'https://token.services.mozilla.com', exp: now + (60 * 5)} body = base64(header) + '.' + base64(claims) signature = token + '.' + rsa_encrypt_on_private_key(base64(token)) assertion = certificate + '~' + signature }</nowiki></pre> Certificate has my public key. I get it from auth server. After that i try to send request <pre><nowiki>request( 'GET', 'https://token.services.mozilla.com/1.0/sync/1.5') </nowiki></pre> with Authorization header: <pre><nowiki>BrowserID <assertion></nowiki></pre> I think server recognize me, because it response me not with Unauthorized header, but i get error: <pre><nowiki>{"status": "error", "errors": [{"location": "body", "name": "", "description": "Resource is not available"}]}</nowiki></pre> How can i resolve this problem? Please, i spent so much time on it. Need help. At least tell me is my assertion generation algorithm correct and if not can somebode show how it should be?

Modifié le par cor-el

Toutes les réponses (2)

more options

I made mistake.

signature = body+ '.' + rsa_encrypt_on_private_key(base64(body))

Sorry.

more options

But it does affect my question. Still need help.