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
const browser = await puppeteer.launch({ headless: false }); | |
const page = await browser.newPage(); | |
let openedAt = null; | |
let redirectedAt = null; | |
let endedAt = null; | |
// Promise to track when a redirect happens | |
let redirectPromise = new Promise(resolve => { | |
page.on('response', response => { |
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
import javax.net.ssl.* | |
import java.security.KeyStore | |
import java.io.* | |
import java.net.URL | |
// --- Configuration --- | |
def apiUrl = "https://<pvwa-url>/AIMWebService/api/Accounts" | |
def appId = "MyAppID" | |
def safe = "MySafe" | |
def objectName = "MyAccount" |
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
import javax.security.auth.login.LoginContext | |
import javax.security.auth.login.Configuration | |
import javax.security.auth.callback.* | |
import com.sun.security.auth.callback.TextCallbackHandler | |
class PasswordCallbackHandler implements CallbackHandler { | |
private String username | |
private String password | |
PasswordCallbackHandler(String username, String password) { |
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
import { jwtDecrypt } from 'jose'; | |
// Your base64-encoded 256-bit key (should decode to 32 bytes) | |
const base64Key = 'yourBase64EncodedKeyHere'; // example: "3q2+7w==..." | |
// Decode base64 to a Uint8Array | |
const key = Uint8Array.from(Buffer.from(base64Key, 'base64')); | |
// Your JWE compact token | |
const token = 'eyJalgIjoiZGlyIiwiZW5jIjoiQTI1NkdDTSJ9..<IV>.<ciphertext>.<tag>'; |
OlderNewer