- Obtain issuer from /.well-known/webfinger
- Obtain OP config from /.well-knonw/openid-configuration
- Any existing client_id for the issuer?
- YES => Use it and go Step.4
- NO => Go Step.3
- Register Client
- Start Dancing
require 'keynote-client' | |
include Keynote | |
# Fetch all themes | |
themes = Theme.all | |
# Fetch theme specified name | |
theme = Theme.find_by(name: 'black').first | |
p theme |
Verifying that +nov is my blockchain ID. https://onename.com/nov |
nov.matake@tovan cipherscan (master)$ ./cipherscan auth.login.yahoo.co.jp | |
............... | |
Target: auth.login.yahoo.co.jp:443 | |
prio ciphersuite protocols pfs curves | |
1 ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 ECDH,P-256,256bits prime256v1 | |
2 ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 ECDH,P-256,256bits prime256v1 | |
3 ECDHE-RSA-AES128-SHA256 TLSv1.2 ECDH,P-256,256bits prime256v1 | |
4 ECDHE-RSA-AES256-SHA384 TLSv1.2 ECDH,P-256,256bits prime256v1 | |
5 AES128-GCM-SHA256 TLSv1.2 None None |
<?php | |
$gree_mobile = "invalid"; |
require 'json/jwt' | |
k = OpenSSL::PKey::EC.new('prime256v1').generate_key | |
k.to_jwk | |
# => JSON::JWK | |
jwk = JSON::JWK.new( | |
kty: "EC", | |
crv: "P-256", | |
x: "D4L5V9QocZvfuEEGfGD5YCEbIcXR-KfF7RqqZUaovJ8", |
arr = ["str"] | |
str = "str" | |
puts arr[0] # => "str" | |
puts str[0] # => "s" |
require 'oauth' | |
callback_url = 'http://example.com/callback?foo=bar®_code=123©_code=456' | |
request_token = OAuth::Consumer.new( | |
'<CONSUMER-KEY>', | |
'<CONSUMER-SECRET>', | |
site: 'https://api.twitter.com' | |
).get_request_token( | |
oauth_callback: callback_url |
class Identity::Google | |
def config | |
@config ||= OpenIDConnect::Discovery::Provider::Config.discover! Rails.application.secrets.google[:issuer] | |
end | |
def jwks | |
@jwks ||= config.jwks | |
end | |
def public_keys |
require 'oauth' | |
consumer = { | |
key: YOUR_CONSUMER_KEY, | |
secret: YOUR_CONSUMER_SECRET | |
} | |
consumer = OAuth::Consumer.new( | |
consumer[:key], | |
consumer[:secret], |