Skip to content

Instantly share code, notes, and snippets.

View jgomer2001's full-sized avatar

Jose Gonzalez jgomer2001

View GitHub Profile
@jgomer2001
jgomer2001 / ContinuationSerializer.java
Last active February 7, 2022 21:59
serialization/deserialization of Rhino continuations
//package ...;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
import java.io.OutputStream;
import java.util.stream.Stream;
@jgomer2001
jgomer2001 / index.zul
Created February 5, 2020 16:04
Button below the fold are clickable
<zk:zk xmlns:z="http://www.zkoss.org/2005/zul" xmlns:h="xhtml" xmlns:w="client" xmlns:zk="zk" xmlns="native">
<z:zscript>
list = new int[20];
</z:zscript>
<style>
.big {
font-size: 60px;
display:block;
}
@jgomer2001
jgomer2001 / passport-central-config.json
Created March 6, 2019 14:25
Full passport config sample
{
"conf": {
"serverURI": "https://acme.co",
"serverWebPort": 8090,
"postProfileEndpoint": "https://acme.co/oxauth/postlogin.htm",
"spTLSCert": "/etc/certs/passport-sp.crt",
"spTLSKey": "/etc/certs/passport-sp.key",
"logging": {
"level": "info",
"consoleLogOnly" : false,
@jgomer2001
jgomer2001 / ui_providers_form_metadata.json
Created February 8, 2019 13:21
Describes the form fields applicable for several sample providers: names, data types, requiredness, etc...
[
{
"id": "openidconnect",
"attributes" : [
{
"name": "id",
"type": "string",
"hint": "Identifier for this OP",
"mandatory": true
},
@jgomer2001
jgomer2001 / idp-initiated-config.json
Last active March 1, 2019 14:16
Configures IDP-initiated params for configured SAML providers
{
"openidclient": {
"authorizationEndpoint": "https://my.gluu.to/oxauth/restv1/authorize",
"clientId": "@!...",
"acr_values": "passport_saml"
},
"authorizationParams": [
{
"provider" : "saml-IPD1",
"redirect_uri": "",
@jgomer2001
jgomer2001 / providers.json
Last active March 1, 2019 14:24
Sample providers configuration
[
{
"id": "windowslive",
"type": "oauth",
"displayName": "Windows Live",
"logo_img" : "...",
"enabled": false,
"passportStrategyId": "passport-windowslive",
"passportAuthnParams" : "{\"scope\": [ \"wl.signin\", \"wl.basic\"]}",
"options": {
@jgomer2001
jgomer2001 / mappings_example_1.json
Last active February 7, 2019 12:26
Showcases how some different attribute mappings could look
[
{
"id" : "saml_ldap",
"description": "Mapping based on SAML X.500/LDAP Attribute profile",
"editable": false,
"mapping": [
{ "local": "uid", "remote": "urn:oid:0.9.2342.19200300.100.1.1" },
{ "local": "mail", "remote": "urn:oid:0.9.2342.19200300.100.1.3" },
{ "local": "displayName", "remote": "urn:oid:2.16.840.1.113730.3.1.241" },
{ "local": "givenName", "remote": "urn:oid:2.5.4.42" },