Skip to content

Instantly share code, notes, and snippets.

using Toopher;
// Create an API object using your credentials
ToopherApi api = new ToopherApi("<your consumer key>", "<your consumer secret>");
// Step 1 - Pair with their phone's Toopher app
PairingStatus pairing = api.Pair("pairing phrase", "username@yourservice.com");
using Toopher;
// Create an API object using your credentials
ToopherApi api = new ToopherApi("<your consumer key>", "<your consumer secret>");
// Authenticate a log in
AuthenticationStatus auth = api.Authenticate(pairing.id, "my computer");
// Once they've responded you can then check the status
AuthenticationStatus status = api.GetAuthenticationStatus(auth.id);
import com.toopher.*;
// Create an API object using your credentials
ToopherApi api = new ToopherApi("<your consumer key>", "<your consumer secret>");
// Step 1 - Pair with their phone's Toopher app
PairingStatus pairing = api.pair("pairing phrase", "username@yourservice.com");
import com.toopher.*;
// Create an API object using your credentials
ToopherApi api = new ToopherApi("<your consumer key>", "<your consumer secret>");
// Step 2 - Authenticate a log in
AuthenticationStatus auth = api.authenticate(pairing.id, "my computer");
// Once they've responded you can then check the status
AuthenticationStatus status = api.getAuthenticationStatus(auth.id);
import toopher
# Create an API object using your credentials
api = toopher.ToopherApi("<your consumer="" key="">", "<your consumer="" secret="">")
# Authenticate a log in
auth = api.authenticate(pairing_status.id, "my computer")
# Once they've responded you can then check the status
auth_status = api.get_authentication_status(auth.id)
import toopher
# Create an API object using your credentials
api = toopher.ToopherApi("<your consumer key>", "<your consumer secret>")
# Step 1 - Pair with their phone's Toopher app
pairing_status = api.pair("pairing phrase", "username@yourservice.com")
{
"authenticator": {
"consumer": {
"key": "key"
},
"created": "2015-01-01 10:10:10",
"id": "12345678-1234-4123-8123-123456789abc",
"modified": "2015-01-01 10:10:10",
"name": "authenticator"
},
{
"authenticator": {
"consumer": {
"key": "key"
},
"created": "2015-01-01 10:10:10",
"id": "12345678-1234-4123-8123-123456789abc",
"modified": "2015-01-01 10:10:10",
"name": "authenticator"
},
@smholloway
smholloway / check_for_yaml_vulnerability
Created April 17, 2014 18:03
Psych YAML vulnerability on Heroku
# Built from https://gist.github.com/markpundsack/4506402
`heroku list`.split("\n").each do |app|
app = app.strip
# Some "heroku apps" lines have === formatting for grouping. They're not apps.
next if app[0..2] == "==="
# Some are appended by owner emails
app = app.split(" ")[0].to_s.strip

Keybase proof

I hereby claim:

  • I am smholloway on github.
  • I am sethholloway (https://keybase.io/sethholloway) on keybase.
  • I have a public key whose fingerprint is 3613 037C 0F80 E273 62F9 4E31 856E 6BAB B0CB A24D

To claim this, I am signing this object: