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
<?php | |
// Request Token Endpoint | |
$req_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_request_token'; | |
// AuthZ Endpoint | |
$authurl = 'https://auth.login.yahoo.co.jp/oauth/v2/request_auth'; | |
// Access Token Endpoint | |
$acc_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_token'; | |
// callback_url | |
$cbc_url = '(戻り先)'; |
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 perl | |
use strict; | |
use warnings; | |
use Acme::JWT; | |
use JSON::XS; | |
use Data::Dumper; | |
use Crypt::OpenSSL::RSA; | |
use Convert::PEM; |
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
Test Tool : http://www.kodtest.se/oictest/ | |
Env : VM Player, CentOS 6(64bit) | |
# setup | |
$ cd oictest/test/oic | |
$ cat ryo.py | |
#!/usr/bin/env python | |
import json |
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
Memo : JR System UserInfo & Resource | |
メモメモ | |
=== | |
やること | |
UserInfo |
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
OP : Registration | |
=== | |
<intent | |
action="http://webintents.org/openid" | |
type="application/JSON" | |
href="/.well-known/openid-configuration" | |
/> | |
=== | |
RP : |
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
$ cat Authen_OATH_sample.pl | |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Authen::OATH; | |
use MIME::Base32 qw( RFC ); | |
my $oath = Authen::OATH->new(); |
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
$ cat test.php | |
<?php | |
function base64_urlencode($str){ | |
$enc = base64_encode($str); | |
$enc = rtrim($enc,"="); | |
$enc = strtr($enc,"+/","-_"); | |
return $enc; | |
} |
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
# RSA PubKey Generate??? | |
$ openssl genrsa -out private.key | |
Generating RSA private key, 512 bit long modulus | |
......++++++++++++ | |
...++++++++++++ | |
unable to write 'random state' | |
e is 65537 (0x10001) | |
$ openssl rsa -in private.key -out public.key -pubout |
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
<?php | |
// Request Token Endpoint | |
$req_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_request_token'; | |
// AuthZ Endpoint | |
$authurl = 'https://auth.login.yahoo.co.jp/oauth/v2/request_auth'; | |
// Access Token Endpoint | |
$acc_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_token'; | |
// callback_url | |
$cbc_url = '(戻り先URL)'; |
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
<?php | |
// Request Token Endpoint | |
$req_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_request_token'; | |
// AuthZ Endpoint | |
$authurl = 'https://auth.login.yahoo.co.jp/oauth/v2/request_auth'; | |
// Access Token Endpoint | |
$acc_url = 'https://auth.login.yahoo.co.jp/oauth/v2/get_token'; | |
// callback_url | |
$cbc_url = 'Input Callback URL'; |