Mehrere Gültigkeitsbereichswerte für oauth2

Ich versuche zu posten sereval scope-Werte zulassen, dass meine Anwendung für einige google-Dienst...

Habe ich versucht mit zwei input-Feld

<input type="hidden" name="scope" value="https://www.googleapis.com/auth/calendar" />  
<input type="hidden" name="scope" value="https://www.googleapis.com/auth/userinfo.email" />

und mit einem input-Feld mit + separator

<input type="hidden" name="scope" value="https://www.googleapis.com/auth/calendar+https://www.googleapis.com/auth/userinfo.email" />  

Wenn ich mein Formular mit nur einem Rahmen ist Es Arbeit.
ansonsten mit sereval Umfang Wert google redirect mich mit dieser Fehler Beschreibung :

http://localhost:49972/redirect.aspx#error=invalid_request&error_description=OAuth+2+parameters+can+only+have+a+single+value:+scope&error_uri=http://code.google.com/apis/accounts/docs/OAuth2.html 

In der google erste Schritte mit oAuth2 es arbeitet mit zwei scope-Werte.

Hier ist mein code :

  <form id="form1" method="post" action="https://accounts.google.com/o/oauth2/auth?" >
    <div>
        <input type="hidden" name="response_type" value="code" />
        <input type="hidden" name="client_id" value="my client id" />
        <input type="hidden" name="redirect_uri" value="http://localhost:49972/redirect.aspx" />
        <input type="hidden" name="scope" value="https://www.googleapis.com/auth/calendar" />
        <input type="hidden" name="scope" value="https://www.googleapis.com/auth/userinfo.email" />

        <input type="hidden" name="state" value="/profile" />
        <input type="submit" value="go" />
    </div>
    </form>

InformationsquelleAutor der Frage Christophe Debove | 2011-12-09

Schreibe einen Kommentar