Introduction OpenID Authentication 2.0

download Introduction OpenID Authentication 2.0

of 48

  • date post

    08-Dec-2014
  • Category

    Technology

  • view

    4.448
  • download

    3

Embed Size (px)

description

OpenID Tech Night Vol.4 にて行ったプレゼンテーション。OpenID の入門者向け。

Transcript of Introduction OpenID Authentication 2.0

  • OpenID Tech Night #4

  • Yahoo!,mixi,GoogleOpenID

  • zigorou.myopenid.com

    OpenIDmyopenidzigorou.myopenid.com

  • iKnow(www.iknow.co.jp)http://zigorou.myopenid.com/Continue

  • [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 http://specs.openid.net/auth/2.0/signon http://openid.net/sreg/1.0 http://openid.net/extensions/sreg/1.1 http://schemas.openid.net/pape/policies/2007/06/phishing-resistant http://openid.net/srv/ax/1.0 http://www.myopenid.com/server http://zigorou.myopenid.com/

  • #!/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" );

    89b7f51ec9b76e97d5a179f313af38e6cc8b5cb0860e266caf6847ded05428ce