oauth 2.0 - How to get a Bearer access token for Service Accounts -



oauth 2.0 - How to get a Bearer access token for Service Accounts -

i have generate credentials service business relationship this:

f = file(settings.service_account_pkcs12_file_path, 'rb') key = f.read() f.close() credentials = client.signedjwtassertioncredentials(settings.service_account_email, key, scope=settings.groups_scope, sub=settings.admin_domain_email) print 'credentials : '+str(credentials.to_json())

the print display credentials in json format :

{"private_key": "miigwaibazccbnoglun09ywa1l7g8xc2sga9edhxadkw4dah...83j+6iagieaa==", "id_token": null, "token_uri": "https://accounts.google.com/o/oauth2/token", "token_response": null, "client_id": null, "scope": "https://www.googleapis.com/auth/admin.directory.group", "token_expiry": null, "_class": "signedjwtassertioncredentials", "refresh_token": null, "_module": "oauth2client.client", "private_key_password": "notasecret", "access_token": null, "service_account_name": "xxx@developer.gserviceaccount.com", "invalid": false, "assertion_type": null, "kwargs": {"sub": "username@domain.com"}, "client_secret": null, "revoke_uri": "https://accounts.google.com/o/oauth2/revoke", "user_agent": null}

this generate private key ans access token null.

is there class handels rest request specified here access token ?

oauth-2.0 access-token service-accounts bearer-token

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -