狠狠撸

狠狠撸Share a Scribd company logo
OpenID Tech Night #4
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
???この部分に?Yahoo!,?mixi,?Google?のロゴと、どこかで見たようなロゴがあ
りますね!?
???一番右のが?OpenID?のロゴです。?
???とりあえずココを押してみましょう。?
zigorou.myopenid.com
???OpenID?のアドレス?ああ、myopenid?で取得したときに?
zigorou.myopenid.com?が自分のアドレスだったな。?
???じゃ、入力してログインボタン押してみよう?
???とりあえず?iKnow?(www.iknow.co.jp)?に?http://
zigorou.myopenid.com/?としてサインインするかどうか聞かれてる?
???Continue?を押してみましょう!?
???ログインできた!?
???とりあえず全然学習できてないのがバレバレですね><?
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
[zigorou ~] $ lwp-request -S -e -d http://zigorou.myopenid.com/ | grep XRDS
X-XRDS-Location: http://zigorou.myopenid.com/?xrds=1
[zigorou ~] $ lwp-request http://zigorou.myopenid.com/?xrds=1
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
xmlns:xrds="xri://$xrds"
xmlns:openid="http://openid.net/xmlns/1.0"
xmlns="xri://$xrd*($v*2.0)">
<XRD version="2.0">
<Service priority="0">
<Type>http://specs.openid.net/auth/2.0/signon</Type>
<Type>http://openid.net/sreg/1.0</Type>
<Type>http://openid.net/extensions/sreg/1.1</Type>
<Type>http://schemas.openid.net/pape/policies/2007/06/phishing-resistant</Type>
<Type>http://openid.net/srv/ax/1.0</Type>
<URI>http://www.myopenid.com/server</URI>
<LocalID>http://zigorou.myopenid.com/</LocalID>
</Service>
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
#!/usr/bin/perl
use strict;
use warnings;
use Digest::SHA qw(hmac_sha256_hex);
use Perl6::Say;
our $hmac_key = "common_secret";
sub format_keyval {
my %pairs = @_;
join "n" => map { $_ . ':' . $pairs{$_} }
keys %pairs;
}
sub sig {
my %pairs = @_;
my $keyval = format_keyval(%pairs);
hmac_sha256_hex($keyval,
$hmac_key);
}
say sig( foo => "abc", bar => "xyz" );
89b7f51ec9b76e97d5a179f313af38e6cc8b5cb086
0e266caf6847ded05428ce
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0
Introduction OpenID Authentication 2.0

More Related Content

Introduction OpenID Authentication 2.0