This file contains 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/env ruby | |
# | |
# This code snippet shows how to enable SSL in Sinatra+Thin. | |
# | |
require 'sinatra' | |
require 'thin' | |
class MyThinBackend < ::Thin::Backends::TcpServer | |
def initialize(host, port, options) |
This file contains 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
// An example of "Amazon API Gateway Custom Authorizer" (node.js). | |
// Copyright (c) 2016 Authlete, Inc. | |
// | |
// The MIT License | |
// | |
// Permission is hereby granted, free of charge, to any person | |
// obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without | |
// restriction, including without limitation the rights to use, |
This file contains 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
{ | |
"iss": "https://authlete.com", | |
"sub": "1004", | |
"aud": [ | |
"7681191256" | |
], | |
"exp": 1651654999, | |
"iat": 1651568599, | |
"auth_time": 1651568599, | |
"nonce": "n-0S6_WzA2Mj", |
This file contains 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
{ | |
"transformed_claims_predefined": { | |
"age_100_or_over": { | |
"claim": "birthdate", | |
"fn": [ | |
"years_ago", | |
[ "gte", 100 ] | |
] | |
} | |
} |
This file contains 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
{ | |
"id_token": { | |
"verified_claims": { | |
"verification": { | |
"trust_framework": null | |
}, | |
"claims": { | |
"given_name": null, | |
"::age_100_or_over": null | |
} |
This file contains 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
{ | |
"transformed_claims": { | |
"age_18_or_over": { | |
"claim": "birthdate", | |
"fn": [ | |
"years_ago", | |
[ "gte", 18 ] | |
] | |
} | |
}, |
This file contains 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
{ | |
"age_18_or_over": { | |
"claim": "birthdate", | |
"fn": [ | |
"years_ago", | |
[ "gte", 18 ] | |
] | |
} | |
} |
This file contains 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
{ | |
"verified_claims": { | |
"verification": { | |
"trust_framework":"eidas", | |
"assurance_level": "substantial", | |
"evidence": [ | |
{ | |
"type": "document", | |
"method": "pipp", | |
"time": "2012-04-22T11:30Z", |
This file contains 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
{ | |
"verified_claims": { | |
"verification": { | |
"trust_framework":"eidas", | |
"assurance_level": "substantial", | |
"evidence": [ | |
{ | |
"type": "document", | |
"method": "pipp", | |
"time": "2012-04-22T11:30Z", |
NewerOlder