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 java.time.Instant | |
import java.time.format.DateTimeFormatter | |
import java.util.UUID | |
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
import org.forgerock.util.encode.Base64 | |
def SECRET = "my-super-secret-key" // 🔐 Replace with real shared secret | |
String computeSignature(String method, String path, String timestamp, String nonce, String body, String 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
FROM node:18-slim | |
WORKDIR /app | |
COPY server.js . | |
EXPOSE 8080 | |
CMD ["node", "server.js"] |
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>'; |
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 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
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 requests | |
import hashlib | |
import base64 | |
import time | |
import urllib.parse | |
# Configuration | |
CLIENT_ID = 'your_client_id' | |
AUTHORIZATION_SERVER = 'https://authorization-server.com' | |
DEVICE_CODE_URL = f'{AUTHORIZATION_SERVER}/oauth/device/code' |
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
https://github.com/ymartin59/java-kerberos-sfudemo/blob/df1f7dfd4801b06f1debc923e1cce4416ec02a7c/src/main/java/sfudemo/KerberosDemo.java#L154 |
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 | |
while true | |
do | |
oci resource-manager job create-apply-job --stack-id ocid1.ormstack.oc1.iad.<id> --execution-plan-strategy AUTO_APPROVED | |
sleep 300 | |
done |
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
studocu.com##div[style="display: block; user-select: none; filter: blur(4px);"]:style(filter: none !important;) | |
studocu.com##[id^="pf"] > [class^="_"] |
NewerOlder