This file contains hidden or 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; } |
This file contains hidden or 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> | |
| <title>2nd Factor Authentication</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <style type="text/css"> | |
| html, body { padding: 0; margin: 0; } |
This file contains hidden or 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 (user, context, callback) { | |
| let role = user.app_metadata.role || 'limied-authority'; | |
| if (role === 'legal-lessee' || role === 'full-authority') | |
| context.accessToken.scope = ['read:usage', 'read:bill', 'pay:bill', 'update:email']; | |
| else | |
| context.accessToken.scope = ['read:bill']; | |
| context.accessToken['http://custom.ns/role'] = role; // plain text role, for audit | |
This file contains hidden or 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
| var myPlugin = (function () { | |
| var _webAuth | |
| var ctor = function MyPlugIn() { | |
| var _this = this | |
| this.args = arguments | |
| this.supports = function (extensibilityPoint) { | |
| console.log(extensibilityPoint) | |
| return false | |
| } |
This file contains hidden or 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 (user, context, callback) { | |
| if (!global.myFunc) { | |
| global.myFunc = function (param) { | |
| return true; | |
| }; | |
| } | |
| callback(null, user, context); | |
| } |
This file contains hidden or 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 login (email, password, callback) { | |
| return callback(new UnauthorizedError('custom db error to display in HLP Lock flashMessage')); | |
| } |
This file contains hidden or 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 login (username, password, callback){ | |
| request({ | |
| url: 'https://' + configuration.Domain + '/oauth/token', | |
| method: 'POST', | |
| form: { | |
| grant_type: 'password', | |
| scope: 'openid', // todo: add name to scope | |
| audience: configuration.Audience, | |
| client_id: configuration.Client_ID, | |
| client_secret: configuration.Client_Secret, |
This file contains hidden or 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/perl | |
| # generates Maven pom.xml based on nbproject | |
| # d640492 | |
| use strict; | |
| use warnings; | |
| use File::Basename; | |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>oes-demo</groupId> | |
| <artifactId>authorization-client-rmi</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <properties> |