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
function boostrapRule(user, context, callback) { | |
/** | |
* Create a new Logger instance | |
* | |
* @returns {{log: (function(*=): number), commitLogs: (function(): void)}} | |
*/ | |
const loggerFactory = () => { | |
const logs = []; | |
const commitLogs = () => { | |
if (logs.length === 0) |
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
#!/usr/bin/env bash | |
set -eufo pipefail | |
declare -A form_parts | |
function usage() { | |
cat <<END >&2 | |
USAGE: $0 [-F key=value] [-F key=@file] [curl-opts] [-v|-h] | |
-F key=value # curl post key=value |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/lodash/4.17.4/lodash.core.min.js"></script> | |
<script src="//cdn.auth0.com/js/auth0/8.12.2/auth0.min.js"></script> | |
</head> | |
<body> | |
<script> | |
// standard config decoding as in the default template | |
var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@')))); |
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
client = yes | |
debug = 5 | |
foreground = yes | |
pid = /var/tmp/stunnel-client.pid | |
cert= st.pem | |
[Application] | |
accept = 1081 | |
connect = 3000 |
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
module.exports = function (user, context, cb) { | |
const ManagementClient = require("[email protected]").ManagementClient; | |
const auth0 = new ManagementClient({ | |
domain: context.connection.tenant + '.eu.auth0.com', | |
clientId: context.webtask.secrets.delete_refresh_token_client_id, | |
clientSecret: context.webtask.secrets.delete_refresh_token_client_secret, | |
scope: 'read:device_credentials delete:device_credentials' | |
}); | |
const getRefreshTokens = type => auth0.deviceCredentials.getAll({ user_id: user.id, type: type }); | |
const deleteRefreshToken = id => auth0.deviceCredentials.delete({ id: id }) |
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
daemon off; | |
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
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
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
import 'package:flutter_appauth/flutter_appauth.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Cross Origin + Silent Authentication</title> | |
<meta charset="utf-8"> | |
<script src="https://cdn.auth0.com/js/auth0/9.13.1/auth0.min.js"></script> | |
</head> | |
<body> | |
<label for="username">Username</label><input id="username" type="text"/> | |
<br/> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>ROPG</title> | |
<meta charset="utf-8"> | |
<script src="https://www.google.com/recaptcha/api.js?render=XXXXXX"></script> | |
<style> | |
.grecaptcha-badge { visibility: hidden; } | |
</style> | |
</head> |
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
#!/bin/bash | |
set -euo pipefail | |
[[ "$#" -lt 1 ]] && { echo "$0 http://someurl" && exit 1; } | |
which curl >/dev/null || { echo >&2 "Error: you need curl"; exit 2; } | |
which jq >/dev/null || { echo >&2 "Error: you need jq"; exit 2; } | |
which awk >/dev/null || { echo >&2 "Error: you need awk"; exit 2; } |
NewerOlder