Skip to content

Instantly share code, notes, and snippets.

View ocap-kirk's full-sized avatar

Thomas Kirk ocap-kirk

  • Permit.io
  • 18:09 (UTC -05:00)
View GitHub Profile
@ocap-kirk
ocap-kirk / raw-to-curl.html
Created August 23, 2024 15:54
HTTP Request to Curl Command Converter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTTP Request to Curl Command Converter</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<h1>HTTP Request to Curl Command Converter</h1>
@ocap-kirk
ocap-kirk / index.html
Last active May 28, 2020 18:56
Okta Sign-in Widget PKCE Example
<!DOCTYPE html>
<html>
<head>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<script src="https://global.oktacdn.com/okta-signin-widget/3.2.1/js/okta-sign-in.min.js" type="text/javascript"></script>
<link href="https://global.oktacdn.com/okta-signin-widget/3.2.1/css/okta-sign-in.min.css" type="text/css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
@ocap-kirk
ocap-kirk / README.md
Last active March 8, 2019 19:35
Okta SAML Toolkit Fix

Fix Okta SAML Toolkit issues

Errors from mvn package

Could not resolve dependencies for project com.okta:saml-toolkit:jar:2.0.5-fa68307: Could not find artifact jndi:jndi:jar:1.2.1 in central (https://repo.maven.apache.org/maven2)

Could not resolve dependencies for project com.okta:saml-toolkit:jar:2.0.5-fa68307: Failure to find jndi:jndi:jar:1.2.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Fix

Extract and local-install jndi jar

@ocap-kirk
ocap-kirk / index.html
Created February 21, 2019 17:45
Okta PIV / CAC Sign-in Widget Example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- import the webpage's stylesheet -->
<link rel="stylesheet" href="/style.css">
@ocap-kirk
ocap-kirk / Okta-IDP-Discovery-In-Widget.html
Last active May 13, 2020 13:23
Okta IdP Discovery Widget Example (OIDC)
<!DOCTYPE html>
<html>
<head>
<script src="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.14.0/js/okta-sign-in.min.js" type="text/javascript"></script>
<link href="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.14.0/css/okta-sign-in.min.css" type="text/css" rel="stylesheet" />
<link href="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.14.0/css/okta-theme.css" type="text/css" rel="stylesheet" />
<style>
/*.primary-auth .o-form-input-name-username.o-form-control.okta-form-input-field.input-fix{display: none;}*/
</style>
@ocap-kirk
ocap-kirk / udid.js
Last active September 11, 2017 13:59
UDID Generator no dashes
//Answer from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
function get_udid() {
return ([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g, c =>
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
)
}
console.log(get_udid());
@ocap-kirk
ocap-kirk / gist:3444301fb50509ae101a
Created December 16, 2015 19:40
Java SDK Proxy Example
package proxyServerTest.com.test;
import java.io.IOException;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import com.okta.sdk.clients.AuthApiClient;