Google Doc users should probably be familiar with the basic Google Doc password-based password generator.
In this article, I’ll explain how you can use it to test the Google Doc passwords in your Google Drive account.
Google Doc Password Generator For the purposes of this article I’ll be using Google Drive’s Google DocPasswordGenerator.py script to generate the password.
To test your passwords, I’ve created a simple script that generates a random Google Doc, with a random username, and password.
For example, I can use the following script to test my Google DocSass password: from django.contrib.auth.base import BaseAuthAuthFrom django import admin from djangoproject import request,post_form urlpatterns = [ ‘https://www.googleapis.com/auth/doc’ , ‘http:/www.youtube.com’ , ] The password generator script is then used to generate a random user name and password for the user, and you can then use the Google Drive API to get the password from the Google account.
You can then enter the password in the Google Account’s “My Account” page, and it will automatically generate the correct password for you.
You’ll be prompted for the Google Passwords, which are automatically generated and saved to your Google account when you sign in to Google Drive.
Google Drive Passwords for Users You can also use Google Passcodes to get your Google Account credentials.
To generate a Google Doc Passcode, follow these steps: Copy and paste the following code into your admin.py file: from __future__ import print_function import base64 from djongoproJECT import google_passcode from djapuests import query,postfile from djaco.controllers.auth import auth from djampa.authdb import DjangoAuthdb class GooglePasscodeGenerator ( BaseAuthTest ): def test_generate_pass ( self ): try : self .
passcode = BasePassword( self .
username ) except KeyboardInterrupt : raise GooglePassCode ( “Can’t create a valid Google Passcode” ) # If you need to change the passcode, then change the name and the password try : passcode_name = self .
name except KeyboardError : pass_name_string = ‘ ‘ if __name__ == ‘__main__’ : print ( ‘Running Google Pass Codes generator with Django Authdb’ ) print ( “Pass Codes: ” , pass_code_string ) except ImportError : print_error ( “Error while creating Google Pass codes for your Django project” ) except Exception as e: print ( e ) return False # This example is run against a single Google Drive user, but you could also use a multi-user project if you prefer.
For a multi_user project, I could have included the Google API authentication, but for the purposes here I’ll use Google Drive as the primary access point.
The Google Passcoder is a small script that will generate the Google password and the user name, but it also has the ability to set a password to a custom password.
If you want to generate passwords for multiple users, then you’ll need to add the script to your Django admin settings.
Then, from the admin settings, add the following to your admin section: Add the following line to your google_account.py : add_login_required = False The name of this script is “generate google passcodes” (this is the name of the script in the admin).
To run the script, type: python google_passwordgenerator.sh Now, you can generate a user’s Google PassCode using the Google passcode generator.
To run it, run: pythongooglepasscode.sh To set up your Google Pass Code, open a new Google Drive file, and save it as a new file named google_app.
You should see the new Google PassCodes directory.
Create a new folder called “myapp”, and then run the following commands: mkdir myapp myapp/myapp mkdir google_google_app my_app/google_google passcode.py google_api_auth_auth.py This will create a Google account that you can set up as the main access point for your project.
If all goes well, you should see your Google App credentials appear in your project’s Google Drive app.
Now, if you’d like to use your Google Apps credentials to access Google Drive, you’ll have to sign in with your Google ID.
The easiest way to do this is to create a new project, and then add the Google ID to your project settings.
For more information on signing in with Google ID, see the Getting Started Guide.
Note The Google App project will automatically be added to the “My App” directory of your Google app.