<?xml version="1.0" encoding="UTF-8" ?>
<provider id="google">
  <name>Google</name>
  <_description>Includes Gmail, Google Docs, Google+, YouTube and Picasa</_description>
  <icon>google</icon>
  <translations>account-plugins</translations>
  <domains>.*google\.com</domains>

  <template>
    <group name="auth">
      <setting name="method">oauth2</setting>
      <setting name="mechanism">web_server</setting>
      <group name="oauth2">
        <group name="web_server">
          <setting name="Host">accounts.google.com</setting>
          <!-- HACK: access_type is non standard, but Google requires it in
               order to return a refresh token -->
          <setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>
          <setting name="TokenPath">o/oauth2/token</setting>
          <setting name="RedirectUri">https://wiki.ubuntu.com/</setting>
          <setting name="ResponseType">code</setting>
          <setting name="Scope" type="as">['https://docs.google.com/feeds/','https://www.googleapis.com/auth/googletalk','https://www.googleapis.com/auth/userinfo.email','https://www.googleapis.com/auth/userinfo.profile','https://picasaweb.google.com/data/','https://mail.google.com/','https://www.google.com/m8/feeds/','https://www.googleapis.com/auth/calendar','https://www.googleapis.com/auth/carddav']</setting>
          <setting name="ClientId">@GOOGLE_CLIENT_ID@</setting>
          <setting name="ClientSecret">@GOOGLE_CLIENT_SECRET@</setting>
          <setting name="AllowedSchemes" type="as">['https','http']</setting>
          <setting name="ForceClientAuthViaRequestBody" type="b">true</setting>
        </group>
      </group>
    </group>
  </template>
</provider>
