Skip to content

Instantly share code, notes, and snippets.

@mattias-lidman
Created August 17, 2011 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattias-lidman/1151756 to your computer and use it in GitHub Desktop.
Save mattias-lidman/1151756 to your computer and use it in GitHub Desktop.
46 <<<<<<< HEAD
47 # leave this check to ensure we cover the migrated users with open id
48 try:
49 credential_id = create_credential_id(credential_type, params)
50 if _credential_exists_by_id(DataStoreManager().instance(), credential_type, credential_id):
51 return HTTPConflict("OpenID identity already exists")
52 except Exception:
53 message = json.dumps(error.create_error(message='Invalid %s credential' % credential_type))
54 log.exception(message)
55 return HTTPBadRequest(body=message)
56
57 =======
58 >>>>>>> Front end is no longer required to pass the OAuth username to Graph when adding credentials.
59 if credential_type == "openid":
60 # leave this check to ensure we cover the migrated users with open id
61 try:
62 credential_id = utils.create_credential_id(credential_type, params)
63 if _credential_exists_by_id(DataStoreManager().instance(), credential_type, credential_id):
64 return HTTPConflict("OpenID identity already exists")
65 except Exception:
66 message = json.dumps(error.create_error(message='Invalid %s credential' % credential_type))
67 log.exception(message)
68 return HTTPBadRequest(body=message)
69 log.debug("Configuring OpenID")
70 return _configure_openid_session(request, context.user.user_name, 'register_open_id', params['alias'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment