Last active
August 29, 2015 14:20
-
-
Save aaronchi/ae35030524810b40da3a to your computer and use it in GitHub Desktop.
Google SAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Google Calendar | |
group: google-apps | |
base_url: https://www.google.com/calendar | |
allowed_hosts: | |
- google.com | |
- accounts.google.com | |
requires_plugin: true | |
validation_method: script | |
login_type: email | |
login_method: script | |
authentication_types: | |
- browser | |
- saml | |
- google_apps_sso | |
installation: | |
fields: | |
- name: domain | |
saml: | |
url: https://accounts.google.com/AccountChooser?Email={login}&continue=https://www.google.com/calendar/a/{domain} | |
spider: | |
actions: | |
google_apps_sso: | |
authenticate: | |
url: https://www.google.com/calendar/a/{domain} | |
saml: | |
authenticate: | |
url: https://accounts.google.com/AccountChooser?Email={login}&continue=https://www.google.com/calendar/a/{domain} | |
users: | |
authenticate: | |
steps: | |
- action: visit | |
target: https://accounts.google.com/AddSession?sacu=1&continue=https://www.google.com/calendar/ | |
# target: "https://accounts.google.com/Logout?&continue=https://www.google.com/calendar/" | |
- action: click | |
target: "a#account-chooser-link" | |
format: css | |
wait: 0.25 | |
conditions: | |
- type: has_selector | |
target: '#account-chooser-link' | |
- action: click | |
target: "a#account-chooser-add-account" | |
format: css | |
wait: 0.25 | |
conditions: | |
- type: has_selector | |
target: '#account-chooser-add-account' | |
- action: wait | |
value: 0.5 | |
- action: fill_in | |
target: Email | |
value: $email | |
- action: fill_in | |
target: Passwd | |
value: $password | |
- action: click_button | |
target: signIn | |
- action: click | |
target: "#later-link" | |
format: css | |
wait: 0.25 | |
conditions: | |
- type: has_selector | |
target: "#later-link" | |
- action: success | |
conditions: | |
- type: has_no_selector | |
target: ".error-msg,#account-chooser-add-account,#signIn, #later-link" | |
- type: has_selector | |
target: '#onegoogbar' | |
- action: success | |
ignore_initial: true | |
conditions: | |
- type: has_no_field | |
target: Passwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment