Google 페더레이션 로그인을 프리미어 앱 계정과 통합하려고하는데 문제가 있습니다.호스트 앱용 Google 연동 로그인 (OpenID + Oauth) - 종점 변경
모든 매개 변수 (아래 참조)를 사용하여 https://www.google.com/accounts/o8/ud
에 요청을 보내면 request_token
과 요청한 속성 목록이 모두 Attribute Exchange
이됩니다. 이것은 응용 프로그램 데이터베이스에 사용자를 저장하기 위해 속성 exhange (AX)를 통해 전자 메일이 필요하므로 나중에 API requests to scopes
(예 : 달력, 연락처 등)에 대한 요청 토큰이 필요하므로 완벽합니다.
그러나, (여기 endpoint
이라한다) 해당 URL을 사용하는 것은 문제가 자신의 호스팅 애플리케이션 (Gmail, 캘린더, 등)에 로그인 한 사용자를 유지하지 않습니다.
엔드 포인트를 https://www.google.com/a/thedomain.com/o8/ud?be=o8
으로 변경하면 모든 것이 변경됩니다. 나는 자동으로 다른 구글 앱 (gmail 등)에 로그인했다. 그러나 해당 끝점을 사용하여 요청 토큰을 또는에만 AX를 통해 가져옵니다. 분명하게 thats는 특히 잡종이 아니다. 그것의 아주 많은 것 또는 다른 것. 내가 작업이 Hybird 접근 방식을 얻으려고 노력 일 동안 고전을 면치 못하고 한
parameters = {
'openid.ns': 'http://specs.openid.net/auth/2.0',
'openid.claimed_id': 'http://specs.openid.net/auth/2.0/identifier_select',
'openid.identity': 'http://specs.openid.net/auth/2.0/identifier_select',
'openid.return_to':'http://our.domain.com/accounts/callback/',
'openid.realm': 'http://our.domain.com/',
'openid.assoc_handle': assoc_handle,
'openid.mode': 'checkid_setup',
'openid.ns.ext2': 'http://specs.openid.net/extensions/oauth/1.0',
'openid.ext2.consumer': 'our.domain.com',
'openid.ext2.scope': 'https://mail.google.com/mail/feed/atom',
'openid.ns.ax':'http://openid.net/srv/ax/1.0',
'openid.ax.mode':'fetch_request',
'openid.ax.required':'firstname,lastname,email',
'openid.ax.type.firstname':'http://axschema.org/namePerson/first',
'openid.ax.type.lastname':'http://axschema.org/namePerson/last',
'openid.ax.type.email':'http://axschema.org/contact/email',
}
return HttpResponseRedirect(end_point + '?' + urllib.urlencode(parameters))
이 (assoc_handle 이전에 오픈 ID 초기 요청에 의해 성공적으로 설정) https://www.google.com/accounts/o8/ud
엔드 포인트
에
예 요청 싸움 대부분의 불투명 한 오류 메시지 (This page is invalid
... 감사 Google) 및 일관성없는 문서의 부족. 나는이 시점에 도달 할 수있는 모든 코드 샘플을 트롤링했다. 어떤 도움을 주시면 감사하겠습니다 ...