From def5f88c8cab4fd5508d225089accd27e96ee040 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Wed, 21 Apr 2010 17:16:03 +0100 Subject: [PATCH] SEC-1431: Added openid-selector to openid sample, plus AX configuration for myopenid.com. --- docs/manual/src/docbook/samples.xml | 20 ++ .../openid/CustomUserDetailsService.java | 4 + .../WEB-INF/applicationContext-security.xml | 9 +- samples/openid/src/main/webapp/css/openid.css | 45 ++++ samples/openid/src/main/webapp/images/aol.gif | Bin 0 -> 2205 bytes .../openid/src/main/webapp/images/blogger.ico | Bin 0 -> 3638 bytes .../openid/src/main/webapp/images/claimid.ico | Bin 0 -> 3638 bytes .../src/main/webapp/images/facebook.gif | Bin 0 -> 2075 bytes .../openid/src/main/webapp/images/flickr.ico | Bin 0 -> 1150 bytes .../openid/src/main/webapp/images/google.gif | Bin 0 -> 1596 bytes .../src/main/webapp/images/livejournal.ico | Bin 0 -> 5222 bytes .../src/main/webapp/images/myopenid.ico | Bin 0 -> 2862 bytes .../main/webapp/images/openid-inputicon.gif | Bin 0 -> 237 bytes .../openid/src/main/webapp/images/openid.gif | Bin 0 -> 740 bytes .../src/main/webapp/images/technorati.ico | Bin 0 -> 2294 bytes .../src/main/webapp/images/verisign.gif | Bin 0 -> 2550 bytes .../src/main/webapp/images/verisign.ico | Bin 0 -> 4710 bytes .../openid/src/main/webapp/images/vidoop.ico | Bin 0 -> 1406 bytes .../src/main/webapp/images/wordpress.ico | Bin 0 -> 1150 bytes .../openid/src/main/webapp/images/yahoo.gif | Bin 0 -> 1682 bytes .../src/main/webapp/js/jquery-1.2.6.min.js | 32 +++ .../js/openid-client/jquery.query-2.1.3.js | 220 ++++++++++++++++ .../js/openid-client/openid-client-config.js | 20 ++ .../webapp/js/openid-client/openid-client.js | 63 +++++ .../src/main/webapp/js/openid-jquery.js | 240 ++++++++++++++++++ .../openid/src/main/webapp/openidlogin.jsp | 79 ++++-- 26 files changed, 707 insertions(+), 25 deletions(-) create mode 100644 samples/openid/src/main/webapp/css/openid.css create mode 100644 samples/openid/src/main/webapp/images/aol.gif create mode 100644 samples/openid/src/main/webapp/images/blogger.ico create mode 100644 samples/openid/src/main/webapp/images/claimid.ico create mode 100644 samples/openid/src/main/webapp/images/facebook.gif create mode 100644 samples/openid/src/main/webapp/images/flickr.ico create mode 100644 samples/openid/src/main/webapp/images/google.gif create mode 100644 samples/openid/src/main/webapp/images/livejournal.ico create mode 100644 samples/openid/src/main/webapp/images/myopenid.ico create mode 100644 samples/openid/src/main/webapp/images/openid-inputicon.gif create mode 100644 samples/openid/src/main/webapp/images/openid.gif create mode 100644 samples/openid/src/main/webapp/images/technorati.ico create mode 100644 samples/openid/src/main/webapp/images/verisign.gif create mode 100644 samples/openid/src/main/webapp/images/verisign.ico create mode 100644 samples/openid/src/main/webapp/images/vidoop.ico create mode 100644 samples/openid/src/main/webapp/images/wordpress.ico create mode 100644 samples/openid/src/main/webapp/images/yahoo.gif create mode 100644 samples/openid/src/main/webapp/js/jquery-1.2.6.min.js create mode 100644 samples/openid/src/main/webapp/js/openid-client/jquery.query-2.1.3.js create mode 100644 samples/openid/src/main/webapp/js/openid-client/openid-client-config.js create mode 100644 samples/openid/src/main/webapp/js/openid-client/openid-client.js create mode 100644 samples/openid/src/main/webapp/js/openid-jquery.js diff --git a/docs/manual/src/docbook/samples.xml b/docs/manual/src/docbook/samples.xml index 89f3907d40..1503de9bf1 100644 --- a/docs/manual/src/docbook/samples.xml +++ b/docs/manual/src/docbook/samples.xml @@ -99,6 +99,26 @@ Success! Your web filters appear to be properly configured! the same application context file. This means there are actually two identical authentication providers configured in this application. +
+ OpenID Sample + + The OpenID sample demonstrates how to use the namespace to configure OpenID and how to set up + attribute exchange + configurations for Google, Yahoo and MyOpenID identity providers (you can experiment with adding others + if you wish). It uses the JQuery-based openid-selector + project to provide a user-friendly login page which allows the user to easily select a provider, rather than + typing in the full OpenID identifier. + + + The application differs from normal authentication scenarios in that it allows any user to access the site (provided + their OpenID authentication is successful). The first time you login, you will get a Welcome [your name]" + message. If you logout and log back in (with the same OpenID identity) then this should change to Welcome Back. + This is achieved by using a custom UserDetailsService which assigns a standard role + to any user and stores the identities internally in a map. Obviously a real application would use a database instead. + Have a look at the source form more information. This class also takes into account the fact that different attributes may be returned + from different providers and builds the name with which it addresses the user accordingly. + +
CAS Sample The CAS sample requires that you run both a CAS server and CAS client. It isn't diff --git a/samples/openid/src/main/java/org/springframework/security/samples/openid/CustomUserDetailsService.java b/samples/openid/src/main/java/org/springframework/security/samples/openid/CustomUserDetailsService.java index cfa736673a..57dd73c633 100644 --- a/samples/openid/src/main/java/org/springframework/security/samples/openid/CustomUserDetailsService.java +++ b/samples/openid/src/main/java/org/springframework/security/samples/openid/CustomUserDetailsService.java @@ -69,6 +69,10 @@ public class CustomUserDetailsService implements UserDetailsService, Authenticat firstName = attribute.getValues().get(0); } + if (attribute.getName().equals("lastname")) { + lastName = attribute.getValues().get(0); + } + if (attribute.getName().equals("fullname")) { fullName = attribute.getValues().get(0); } diff --git a/samples/openid/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/openid/src/main/webapp/WEB-INF/applicationContext-security.xml index ff1b9ccbed..aa13cc6531 100644 --- a/samples/openid/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/samples/openid/src/main/webapp/WEB-INF/applicationContext-security.xml @@ -11,8 +11,11 @@ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> - + + + + @@ -25,6 +28,10 @@ + + + + diff --git a/samples/openid/src/main/webapp/css/openid.css b/samples/openid/src/main/webapp/css/openid.css new file mode 100644 index 0000000000..8929ff07ab --- /dev/null +++ b/samples/openid/src/main/webapp/css/openid.css @@ -0,0 +1,45 @@ +#openid_form { + width: 580px; +} + #openid_form legend { + font-weight: bold; + } +#openid_choice { + display: none; +} +#openid_input_area { + clear: both; + padding: 10px; +} +#openid_btns, #openid_btns br { + clear: both; +} + #openid_highlight { + padding: 3px; + background-color: #FFFCC9; + float: left; + } + .openid_large_btn { + width: 100px; + height: 60px; + border: 1px solid #DDD; + margin: 3px; + float: left; + } + .openid_small_btn { + width: 24px; + height: 24px; + border: 1px solid #DDD; + margin: 3px; + float: left; + } + a.openid_large_btn:focus { + outline: none; + } + a.openid_large_btn:focus + { + -moz-outline-style: none; + } + .openid_selected { + border: 4px solid #DDD; + } \ No newline at end of file diff --git a/samples/openid/src/main/webapp/images/aol.gif b/samples/openid/src/main/webapp/images/aol.gif new file mode 100644 index 0000000000000000000000000000000000000000..decc4f12362124c74e1e0b78ad4e5d132621ab23 GIT binary patch literal 2205 zcmV;O2x9j~Nk%w1VNn1b0QUd@0a~U0{{97Cr-7}~`~3at@%IK^rUhN5{r>*;`TQ|@ zxAXV<(c$m-`uz9${QUj?tjXaAU#9_Cqyt>0`uzP6Wve@Yx&8hA@b&ra^Y|liumW18 z16!pEV5rI5>-6~hXr0Mflf!YN%x>+Qkd8p6#`TXYZ_T}#Ooxt1~X|1!)YIhOpD5#NM*a<0W#j0a&CWZm>^{ zzyn;Rz}D!)*y=NTw$$VApTXTqiN5vt`#gcU#o6jVg1UmP(x}JZzt!kmmBs1t_qNaF zEOxXxf4M<~yV&LMwa?_c(&n4K+mpH2M25T;XRHups^01ID|NGbsn3_Y+VS@KWSYp* z;_ryE)EsK9fUMC>i@&bQ;tOD?Mu)vGc(qZE!4hSw$lL2DbFy2M#IVcb=I-{7w%6?P z_}%F8#@g%I=JCVW>A~0O1zM$Emc;;Aq|e~)=kN9^bhB5I!`tZcY@o~4Dwe zHhs4lW~<`t^hk)l_4)e+UZ(8x_}b_3h_Ter;O(~1GFN6(4WBES(L=`_W7sA;8&5u>hkx|;qKw=^yu*R z4rHnaUZ-7_#k9}l^!NJ*UZyBu2wvd-h_@b-M1#8yVW@Sa&Gh*C zz}DxCwAK`8te?W&k+|6D@b~`z|2%=Z24AP1z}wd3@G*F`*5vQL)#tg==7q1*{{H`_ z#^61Iy8r+GA^8LV00000EC2ui08s!P000R80RIUbNU)&6g9sBUT*$DY!-o+6J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Sx z)|sz}w0Z6jHaQ_AqDOitt<&SSea)PHxo<4{I(gaj_r1;9XTGktbGBaB{saBT0srj_ z{;~R31Lym74}$(bu>NSIe?gpv&bzYY@H?IKd literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/google.gif b/samples/openid/src/main/webapp/images/google.gif new file mode 100644 index 0000000000000000000000000000000000000000..1b6cd07bd8b9f27175e0a03be3b5849e0f5479c7 GIT binary patch literal 1596 zcmc(e`#aNn0DwQcU}GKMxn#>^B<6OWQKZt-cb3xBiE^HYQf=ZKSu)*APi@FdDnu7l zbE$~JN>R#|+lE{hiz(BRl~d+uOl9Xe=bt$55AUzjP!`6aB*XlLd;L`$MA0-=oh;_@%=DSKzTW5!kkg02oxN<-;QgzZXZ6@(M)5 zb-u1@<^vWqN`U%R3CtOJuojJt|Ec%yo>_yZ%MV%ajx`i>ysy4d0^mKeNIQ#t@2y*KMj}jE8i*m zl#eQZ7!1Pfn72wr)$QwY6gabm(O6$Lylw3Pd(s%KbU5crNh3{eeZxI4(dJKB1MUAN>n;QZCCkQs_tGtJY-^iC3ja3x9v_uTP?vFVW;}s># zx;OS=;!{FWer7!3y~sj6t|9~xWcTkC-QJ+z*` z{$kU`Oy-`7hp(oZDFCEubef~t-M)K#*_S^K7T>g7T^A0(oK7oIN_s0RehD8}s1*i- z0sK!m=+Xa`J^uB-PXLSoRAEU$)j~-M#?mcPT3yt{hn6u4gKCOf&J$L|DbuOJmz+s9 z2lJ2J?sjAok}A_-F35;rl&1P$i@IJDD5Bmxks6yO#s#L4K20(2&;kgjBXbWq$Y}&> zCc!g3Y<~;U$CQlDX2nU|3Dx218gg&b%2GehXilrp4#P1y;weqVUjQptQlB1c;VO7e z@*D^wqyiQ&MP@@Eiijj!C6&AUPa6q7&lm^MToqj2ny^P9>WX^Ttd-e`;&k}6HltTz=X|A>@zzv6@ z)2r$ZZK19Hq1s>pg(Wg*yF5bqcpgSu2*Z=3Y48rhsMseSGm6D#RWnKSz*rI2&e%)U zhJ)uMj-*j*Cq6a|SR^kuis=outMPl7vPf8@-OF`fK(;t_tEV6%zOcxe#-=20Mq7|L zi=0@wEQshFjSRBhL&)v46Z=EWNGr^Y7(cjs9|q}uirjP>UklMq_Cn}BpIZ=OxlIZN zrqgmZ9Daq-5mP(tkggoG%l1Mp5`!YX9P+{9a@vc{UA@ux9w!5<$J7Qsxz)kjp9U>O zdMGwqZ?ce!P4?kRO}wMe2<(jAw{y`J9zkIp$bd;9jpjy5e7h8h$r8hU6K*}g{&bHR zc4&^sGRyCwh1g@leXv&EK^8KfI43fLjtGZ4%_yBJq-Q6Ii74-1r$U?ItVA?Z^o7I@ z6Gx_VGVMkkya7VbaJCw^O!RGWg$&GOOC(&Bu>?}_7>IP{%ivHGBI}%WA6YI2+3M9H z%iJLj*4d~I--NgTJ(9t@qodNU?AaV`YHlKR%UVir5C+OujBse~Mp}pFlaUEl5;MVK zxnv+FK^_1to@fbJn^<{1g0s+?k E17=sO82|tP literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/livejournal.ico b/samples/openid/src/main/webapp/images/livejournal.ico new file mode 100644 index 0000000000000000000000000000000000000000..f3d21ec5e8f629b77c77615982cef929802fbde4 GIT binary patch literal 5222 zcmdT{3s6+o89vBPQIq*$1QbbvAP7Q0Tpmk!l@)pHf>>S> z1vbL6JXf&Eq~nt$W+Y}?NhYbg%X2}TX`y3UlPS(H)68fPIsMMP%d)ZvOQtiO{(Js= z?m7Sef9JdZJ&(JD*bxy~wQ3b%;$cU~E2vFPBC#hV6@5-lg8iE%gba#Un|TxR-jjq} zb3h#KnTHdU;W5$jSK%T=Pj@H?K_Lo-P~nPOqSb0qGXv!dp_JW0@nc==!i$LGD~{u9 zt~8U?B2Fd~qvpC~M^KA`gqqWJF*i|=E@%ujnuad%Of!pb5`P(QC7kR#SP2OTzQ<#W zlv%8aIKD~feX!6nCX`OuQ922|4;{CsbQG#}pj5FEW=E(mRL;B7LWEq0KANYW^3Y=B z_y|vmH;?ld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|8w?F!!Jf|8`_0G@Mi{w$ z=X|SDy7MOoto~1%!)>|A@LPpZ)J;^~NDC9o;+|ify5q^Z+~}r~bWFtv8#b;5N6F%T zh9Q2R{a&r|U)2@;IgyF6UTmI3tzX1!nST@^QP$V_qZVtm#9wTzwZCbi{LlWU{0Anp BEK2|Y literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/myopenid.ico b/samples/openid/src/main/webapp/images/myopenid.ico new file mode 100644 index 0000000000000000000000000000000000000000..ceb06e6a3f0d88fb97cf10475a3062fb0edab33e GIT binary patch literal 2862 zcmeHJJxc>Y5S@6ZrZbS)owhjA&;jnXfl*X745tmMB3MrBW$)n`RP3b417qd6J6bL?UM{+)q(3xlv0Ik%T7j-l59$8$m>#ard~jq(8yIciUu?j(!>?&WKIe?G5c$>` zV+r!H1WS-ha)=*H^!uZEl>O1BP8%xc=fconk~~4DvKCYWn4`b_pUnoZ788}%mc>uh z9HV;s)r}P~NWtqf_p5&HGjTJoZI|S8n)uf0l05g}rdhqaIBpnv^myAWbI*7E=&N3x z95xI+0zR;x-|08c&;6Ul#XdjZARV+no-wSN`};1(+>)AIisPc*P@H*_1Kd%ys#()H z>NUmL)tL6ccj9UxPF`{LG^Rc9JypwV>?^N0yvK~LBc9f{#^OA9dQUv#8Tz7oxfa(K u#=%<%_2}PpAb{bmUKcqz}))c5uC(7v?)v4a2P)ZNa- z@$&T2)z|&~{r~^}A^8LV00000EC2ui01yBW000GQ;3tk`X`bk)Wk@<6#nZYULKH{p zEx|?+kif!I0vIL|#ZMubBmjWH2OtmxIFVa~6JQ7!1CK!f5W#StOTv&C3=E8h2vI1s n+#cd5;2fT3B_0kF0v!+!GARoV78n&7dMN`JIW(4+BOw4gP{MS* literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/openid.gif b/samples/openid/src/main/webapp/images/openid.gif new file mode 100644 index 0000000000000000000000000000000000000000..c718b0e6f37012db6c9c10d9d21c4dea0d0c01bc GIT binary patch literal 740 zcmZ?wbhEHb^k$G`xXQrrKS$vIw-5i{JotZf!T-qt{~ulWe{RG7ST3!;kh({9A)7tlU&$%5*g$f^Ar># z6BXsynVh) zJ?osJf(s)D10z?npvQi179P(djPk7Va&pI%NfVlv<{V@&c*Q1S?C^%corz71;ll+1P9`Sd{~>qE3OQZcJ(5}z4)|O#`p@vJ zr9;Fsp~HjOs*vv^`}=;ISs7Cf1bMkUpV%Pi{6*$qgF{F5!;-XxTBi=%eG5gPtV^!wdin~r1kkVO&vN=8Ce+Xv z$*|MCqlY(ACp$%vPrNeV;U*4lo)c<`?yngdvl5)QWEV6rHbi?!)@MOEE;CkPT#L!!@77y7u K{UjJ!7_0#i2pVPp literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/technorati.ico b/samples/openid/src/main/webapp/images/technorati.ico new file mode 100644 index 0000000000000000000000000000000000000000..fa1083c116527de7cdbf5897976aae8807fce878 GIT binary patch literal 2294 zcmeH}ze^lZ5XZl}d+sirdNzWcsg4x+2g0RLIAWPjuoD!tN}VeB7eq*vB1MXHX)Xi{ zAytZyMi86WScxK7SO|(gE|<@|cRuzut2sy&xMBC*%tj+A zE!c_l2H#`zaX;dYlru_mk^31KdcB@L9&W3#wIFp`YJOeP`OSr1{CK6O-`2Es@?E#T zy1MFK>-Ep~I=Vd7%e_s#J@}-Zvwh`X=4ClX_h=7BXW;)k1Ifb@+v7M5AZI7aYkiNm z$KjX;Qm=X2(~a>=Zn(6-IG8mv>sbkaBEroVrCFBdHr=3XM61uF&u!`5GI1u;Qf<+zMxU!sr1q{f@m!ic#&7x4 zjcDZqv{&NU85cGO2UiL7I^;$4kVpqJ@-E;pjlK(>l3v2Y;e5IS@q=)?(5+CX;*7LwCwnlxopJBahPURBFV+~&J eFF>coTp;}_7zqbJAQuX63TM^f{)_Klzq8-HK65Pq literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/verisign.gif b/samples/openid/src/main/webapp/images/verisign.gif new file mode 100644 index 0000000000000000000000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x~O12syWYaUKC^j&d+|rIZmK*4)3nD=!V^Y|D)97J|C?PnK9W{j|5sikK_<-~j zB9Ma7re4g!anVfBnN3BRq6!uR)Iqc*BNYKUJ~~i(NLEqh;Ss1(xyk6vj3QL-oI(}E ztJRXtBFNMQ1%(&^QRrgWCG@7zAyK_e%IJBC60Uv0=A*yw|Kz_F$NuLuvWqkMvw2)i zo$zJE=5ZUFK~Q{S_xsb>KZ5B3WHsh5CkCG#~pZKK$?_l$V}GW#u_kRkqUX z`UyTd@da8=wc+%sYiMmfjdN#zfeRNd;rz$faN&FhZrr$v&dv^;YrTU@mu}(8l`dTS zyp!h7d$`$gpJq>*C%Yct?%liirkiHU``!4q`ysx0_@`GhR*Wg zL+$LnVne>U0!F8BBDJgQ#SO&zJnpsR{N}Sv)RGX5ladO5OX7h<2Rs-#nHmcwuE~3rz z2>~NUOyad;2ZtE}qZs8M)E9^dp|1)1sQ>G$Z=aRsiI#u(rfHU-9}N`$^h{weM0ms) zh?4E1IgP=fR~iiIb_PS5COyWGoN9OA+h%v^2+Yx zGJaHiGz3ONU|59!7au1(GXnz`A0HnV&|@H)n}q>L0s$9;ARnmIVdDT(f_z;3d|=N* zDLy_ze4rMf1_3@kMlc035Cr)7nOM2`_ymE1g8cmaK$@2aOo2_OfcXEPfdPgOHZw3Z X0PU5rU|_JTL0}LcBo2~?sfE!1%eOAT literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/wordpress.ico b/samples/openid/src/main/webapp/images/wordpress.ico new file mode 100644 index 0000000000000000000000000000000000000000..31b7d2c2b77c039342854190a90a8d8436992b47 GIT binary patch literal 1150 zcmaKqJxT*n6op^J!coBi!TOa}allq&O3PWo1c^ULbO>qe21^@jt1Q7KOpyh+ge)Q1 zK|J4huRH_#zwbc3UEA;R9AO!H&d%roag-+O5 zO!N95T@?S*G}Sgw{mN!=VmhZ5Rzf4>LLtlrZUAWLgGPY+oVrG5xo^yW`xZU-Q@wk~@ zYxS@D)yH#t7kvCm!TtK*mFh-7(+TYB+*i5pa!nc|Jf3SU=XN{`fjrfux$lA7e}n0{ zlfCqFi>Z(M`wVVG>yKK1*9rZ1`iw}=W^iIUOLNU?<8e1$!1FrglCO_u)5YTUvK?eu yI~YIj#-~XLO;hd+o2#A2S^08*UB1qS`QCUE52vFxJ9}scm-~xFcCkL1j=lhFMR`a7 literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/images/yahoo.gif b/samples/openid/src/main/webapp/images/yahoo.gif new file mode 100644 index 0000000000000000000000000000000000000000..42adbfa57f86b8b2df5aa1b7fe90510a7d1fdfdd GIT binary patch literal 1682 zcmV;D25tFANk%w1VN?JR0QUd@mU^Y$)Z(Fuu9$+OiD{W+I(v?Bo^?%%^Y8SKa-f%f zrJRAP?db1@W|sQ-`{?5AU^RD{eyHu}@MAc6Y)F84S&#er{JEpU(8JfsyU}JneZsZL zSS)eo;OgSr=DVrI-qz#a*5rX-lZrIb?D>k<=p7w-06N?k+!11Z%BingssxX*~`Jx%e>NQL4U@#&si&Ry{X0d`1)-{ zg6ib$l60Y~mAI;tw^}Z8;o0SWTajTmc&LxG+tT3I%-z$;*=0U@n}Df z_WAbn_i93aS}k+@`~3Iy_*yJ-{r&yp+~-;?aeZ2la7u;o?eq2W_P3J0;iQSMZ9#_O-sRiQ;BHNT`1AO8Qj6r> z=!+x&Fkmx*3aAJ-s-85w)XV*n|rAH`~33k^Rb@1vYox} z>+;~*+x%&C>Lw4uMvz|_vc)vS@X=;7?8j0^uVyl!LrHg=Iz3>%W_GG_VoC(sJZv``HXa* zrIxkU(csd>*m+iriD#Si^7g{9%5+bN>E!JE{QaMVtz9y8td_W5GInuEg!AzAjBA~X zY@AsvasU7SA^8LV00000EC2ui08{`F000R80L>t9BSw)JIS9nHVe#jm!-o(fN}Ncs zqD6~fM)VmW02LY`Stc0KkV8WON`_FRxX7}l%ZU3P9D0C2ViSKjMS*eC!QC5NWc*24 z$ACo`hlu15G!rIFqD1JxyfmSQfQkeLyuEbT;aCwDIQ`|T5~at(emLt$WH9QCKO?Fj z!YZJpKo=h-$7uT!(ZdXCA3nU9VnV{d0N()k(Y5u#B%yvAamGe5)veXFd%|B&z}{E8T{37 zh=$XgAq(IDLK-DxqXs0h{KJhuWN1QBJY)EyRU!TiVM;~maN!RZP&~xT1YQjCP&*>v zG{z^SKvar9Z%BlLKM^>@P9t6rA<+h8P*4UH{%m1KMF#8;qhgZOW6=OR_%lH)|M;QC z8ZSfy%{eR3AQ2<}h+xkGOhf{J3Vrwkz(32laK<*D3lQa{dk%K=0FpwEPj!g6c z8PB|?!Vn>}!~`5T1t5_zE=)iG0UUIK4SoL5A(0aP5b%#W8tjnDD-wa@&pQ_U;|wMK zP_awA|9s&=3UeHwj6-G|f<{Y6;N(Ia64h{zIqvjAj2hSc^NKS(WVVJ5CDigyFgPgS zk0p~ZbHfV$&=8I(61-3X6MR?_!$S{5GXw`Ytg(h5N(#^hz#+8og#&*SW6=pXX^~7s zFkB+QLkzgEL@`eIumT%^WMK#(^!)R|8hsQ|gbd{TLyHi#R)~`zC)5;?9Um+JL^Gdc zPzgiQO?9dAYKu|J14=HfQCJs5ExCItCfU89hC~?OkX(YSVLmi;d zz!!K_6YW}g;8BGXI9aiX4Mdod4IRil;>SO66v75h2HbJ^?H7Hao9>T4MsJEFFH&Hw-a literal 0 HcmV?d00001 diff --git a/samples/openid/src/main/webapp/js/jquery-1.2.6.min.js b/samples/openid/src/main/webapp/js/jquery-1.2.6.min.js new file mode 100644 index 0000000000..82b98e1d76 --- /dev/null +++ b/samples/openid/src/main/webapp/js/jquery-1.2.6.min.js @@ -0,0 +1,32 @@ +/* + * jQuery 1.2.6 - New Wave Javascript + * + * Copyright (c) 2008 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ + * $Rev: 5685 $ + */ +(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else +return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else +return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else +selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else +this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else +return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else +jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else +ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else +while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else +xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else +jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else +s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff --git a/samples/openid/src/main/webapp/js/openid-client/jquery.query-2.1.3.js b/samples/openid/src/main/webapp/js/openid-client/jquery.query-2.1.3.js new file mode 100644 index 0000000000..07519d134e --- /dev/null +++ b/samples/openid/src/main/webapp/js/openid-client/jquery.query-2.1.3.js @@ -0,0 +1,220 @@ +/** + * jQuery.query - Query String Modification and Creation for jQuery + * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) + * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). + * Date: 2009/02/08 + * + * @author Blair Mitchelmore + * @version 2.1.3 + * + **/ +new function(settings) { + // Various Settings + var $separator = settings.separator || '&'; + var $spaces = settings.spaces === false ? false : true; + var $suffix = settings.suffix === false ? '' : '[]'; + var $prefix = settings.prefix === false ? false : true; + var $hash = $prefix ? settings.hash === true ? "#" : "?" : ""; + var $numbers = settings.numbers === false ? false : true; + + jQuery.query = new function() { + var is = function(o, t) { + return o != undefined && o !== null && (!!t ? o.constructor == t : true); + }; + var parse = function(path) { + var m, rx = /\[([^[]*)\]/g, match = /^(\S+?)(\[\S*\])?$/.exec(path), base = match[1], tokens = []; + while (m = rx.exec(match[2])) tokens.push(m[1]); + return [base, tokens]; + }; + var set = function(target, tokens, value) { + var o, token = tokens.shift(); + if (typeof target != 'object') target = null; + if (token === "") { + if (!target) target = []; + if (is(target, Array)) { + target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value)); + } else if (is(target, Object)) { + var i = 0; + while (target[i++] != null); + target[--i] = tokens.length == 0 ? value : set(target[i], tokens.slice(0), value); + } else { + target = []; + target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value)); + } + } else if (token && token.match(/^\s*[0-9]+\s*$/)) { + var index = parseInt(token, 10); + if (!target) target = []; + target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value); + } else if (token) { + var index = token.replace(/^\s*|\s*$/g, ""); + if (!target) target = {}; + if (is(target, Array)) { + var temp = {}; + for (var i = 0; i < target.length; ++i) { + temp[i] = target[i]; + } + target = temp; + } + target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value); + } else { + return value; + } + return target; + }; + + var queryObject = function(a) { + var self = this; + self.keys = {}; + + if (a.queryObject) { + jQuery.each(a.get(), function(key, val) { + self.SET(key, val); + }); + } else { + jQuery.each(arguments, function() { + var q = "" + this; + q = decodeURIComponent(q); + q = q.replace(/^[?#]/,''); // remove any leading ? || # + q = q.replace(/[;&]$/,''); // remove any trailing & || ; + if ($spaces) q = q.replace(/[+]/g,' '); // replace +'s with spaces + + jQuery.each(q.split(/[&;]/), function(){ + var key = this.split('=')[0]; + var val = this.split('=')[1]; + + if (!key) return; + + if ($numbers) { + if (/^[+-]?[0-9]+\.[0-9]*$/.test(val)) // simple float regex + val = parseFloat(val); + else if (/^[+-]?[0-9]+$/.test(val)) // simple int regex + val = parseInt(val, 10); + } + + val = (!val && val !== 0) ? true : val; + + if (val !== false && val !== true && typeof val != 'number') + val = val; + + self.SET(key, val); + }); + }); + } + return self; + }; + + queryObject.prototype = { + queryObject: true, + has: function(key, type) { + var value = this.get(key); + return is(value, type); + }, + GET: function(key) { + if (!is(key)) return this.keys; + var parsed = parse(key), base = parsed[0], tokens = parsed[1]; + var target = this.keys[base]; + while (target != null && tokens.length != 0) { + target = target[tokens.shift()]; + } + return typeof target == 'number' ? target : target || ""; + }, + get: function(key) { + var target = this.GET(key); + if (is(target, Object)) + return jQuery.extend(true, {}, target); + else if (is(target, Array)) + return target.slice(0); + return target; + }, + SET: function(key, val) { + var value = !is(val) ? null : val; + var parsed = parse(key), base = parsed[0], tokens = parsed[1]; + var target = this.keys[base]; + this.keys[base] = set(target, tokens.slice(0), value); + return this; + }, + set: function(key, val) { + return this.copy().SET(key, val); + }, + REMOVE: function(key) { + return this.SET(key, null).COMPACT(); + }, + remove: function(key) { + return this.copy().REMOVE(key); + }, + EMPTY: function() { + var self = this; + jQuery.each(self.keys, function(key, value) { + delete self.keys[key]; + }); + return self; + }, + load: function(url) { + var hash = url.replace(/^.*?[#](.+?)(?:\?.+)?$/, "$1"); + var search = url.replace(/^.*?[?](.+?)(?:#.+)?$/, "$1"); + return new queryObject(url.length == search.length ? '' : search, url.length == hash.length ? '' : hash); + }, + empty: function() { + return this.copy().EMPTY(); + }, + copy: function() { + return new queryObject(this); + }, + COMPACT: function() { + function build(orig) { + var obj = typeof orig == "object" ? is(orig, Array) ? [] : {} : orig; + if (typeof orig == 'object') { + function add(o, key, value) { + if (is(o, Array)) + o.push(value); + else + o[key] = value; + } + jQuery.each(orig, function(key, value) { + if (!is(value)) return true; + add(obj, key, build(value)); + }); + } + return obj; + } + this.keys = build(this.keys); + return this; + }, + compact: function() { + return this.copy().COMPACT(); + }, + toString: function() { + var i = 0, queryString = [], chunks = [], self = this; + var addFields = function(arr, key, value) { + if (!is(value) || value === false) return; + var o = [encodeURIComponent(key)]; + if (value !== true) { + o.push("="); + o.push(encodeURIComponent(value)); + } + arr.push(o.join("")); + }; + var build = function(obj, base) { + var newKey = function(key) { + return !base || base == "" ? [key].join("") : [base, "[", key, "]"].join(""); + }; + jQuery.each(obj, function(key, value) { + if (typeof value == 'object') + build(value, newKey(key)); + else + addFields(chunks, newKey(key), value); + }); + }; + + build(this.keys); + + if (chunks.length > 0) queryString.push($hash); + queryString.push(chunks.join($separator)); + + return queryString.join(""); + } + }; + + return new queryObject(location.search, location.hash); + }; +}(jQuery.query || {}); // Pass in jQuery.query as settings object diff --git a/samples/openid/src/main/webapp/js/openid-client/openid-client-config.js b/samples/openid/src/main/webapp/js/openid-client/openid-client-config.js new file mode 100644 index 0000000000..f8ffd07027 --- /dev/null +++ b/samples/openid/src/main/webapp/js/openid-client/openid-client-config.js @@ -0,0 +1,20 @@ +/* +Defines the base of where the OpenID Provider redirects its response to. + */ +var server_root = "http://openid-selector.googlecode.com/svn/trunk/" + +/* +On the server-side you'd accept an OpenID URL and perform discovery +on it to find out the actual OpenID endpoint to send the authentication +request to. On the client side it isn't possible to lookup the endpoint +from the target server due to XSS restrictions. The endpoint for each +provider is therefore cached in this static file. If an endpoint isn't +specified for a provider then authentication on the client side cannot +proceed. +*/ +var providers_endpoint = { + google: 'https://www.google.com/accounts/o8/ud', + yahoo: 'https://open.login.yahooapis.com/openid/op/auth', + aol: 'https://api.screenname.aol.com/auth/openidServer', + verisign: 'http://pip.verisignlabs.com/server' +} \ No newline at end of file diff --git a/samples/openid/src/main/webapp/js/openid-client/openid-client.js b/samples/openid/src/main/webapp/js/openid-client/openid-client.js new file mode 100644 index 0000000000..92c1d17c87 --- /dev/null +++ b/samples/openid/src/main/webapp/js/openid-client/openid-client.js @@ -0,0 +1,63 @@ +var claimedID; +var providerID; +var openIDPopup; + +function OpenID_iframe_then_popup_handler(provider, claimed) { + providerID = provider; + claimedID = claimed; + var immediateiframe = document.getElementById("openid_immediate_iframe"); + + var iframeurl = getBaseOpenIDProviderURL(providerID, claimedID, true); + + immediateiframe.innerHTML = ""; +} + +function processOpenIDImmediateResponse(responseURL) { + var immediateiframe = document.getElementById("openid_immediate_iframe"); + immediateiframe.innerHTML = responseURL; + + var failure = new RegExp("openid.mode=setup_needed"); + if(failure.test(responseURL)) { + var popupurl = getBaseOpenIDProviderURL(providerID, claimedID, false); + openIDPopup = window.open(popupurl, "OpenIDPopup"); + } else { + alert("Success without popup!"); + } +} + +function processOpenIDSetupResponse(responseURL) { + openIDPopup.close(); + + var results = ""; + var responseQuery = $.query.load(responseURL); + $.each(responseQuery.get(), function(key, value) { + results += "
" + key + "=" + value; + }); + + document.getElementById("openid_status").innerHTML = "
Result of authentication is: " + results; +} + +function getBaseOpenIDProviderURL(provider, claimed, immediate) { + var providerEndpoint = providers_endpoint[provider]; + var providerURL = providerEndpoint; //From previous discovery + providerURL += "?"; + providerURL += "openid.ns=" + encodeURIComponent("http://specs.openid.net/auth/2.0"); + if(providers[provider].label) { + providerURL += "&openid.claimed_id=" + encodeURIComponent(claimed); + providerURL += "&openid.identity=" + encodeURIComponent(claimed); + } + else { + providerURL += "&openid.claimed_id=" + encodeURIComponent("http://specs.openid.net/auth/2.0/identifier_select"); + providerURL += "&openid.identity=" + encodeURIComponent("http://specs.openid.net/auth/2.0/identifier_select"); + } + if(immediate) { + providerURL += "&openid.return_to=" + encodeURIComponent(server_root + "openid-client/checkid_immediate_response.html"); + providerURL += "&openid.realm=" + encodeURIComponent(server_root + "openid-client/checkid_immediate_response.html"); + providerURL += "&openid.mode=checkid_immediate"; + } else { + providerURL += "&openid.return_to=" + encodeURIComponent(server_root + "openid-client/checkid_setup_response.html"); + providerURL += "&openid.realm=" + encodeURIComponent(server_root + "openid-client/checkid_setup_response.html"); + providerURL += "&openid.mode=checkid_setup"; + } + return providerURL; +} \ No newline at end of file diff --git a/samples/openid/src/main/webapp/js/openid-jquery.js b/samples/openid/src/main/webapp/js/openid-jquery.js new file mode 100644 index 0000000000..eceaddef3e --- /dev/null +++ b/samples/openid/src/main/webapp/js/openid-jquery.js @@ -0,0 +1,240 @@ +/* +Simple OpenID Plugin +http://code.google.com/p/openid-selector/ + +This code is licenced under the New BSD License. +*/ + +var providers_large = { + google: { + name: 'Google', + url: 'https://www.google.com/accounts/o8/id' + }, + yahoo: { + name: 'Yahoo', + url: 'http://yahoo.com/' + }, + aol: { + name: 'AOL', + label: 'Enter your AOL screenname.', + url: 'http://openid.aol.com/{username}' + }, + verisign: { + name: 'Verisign', + label: 'Your Verisign username', + url: 'http://{username}.pip.verisignlabs.com/' + }, + openid: { + name: 'OpenID', + label: 'Enter your OpenID.', + url: null + } +}; +var providers_small = { + myopenid: { + name: 'MyOpenID', + label: 'Enter your MyOpenID username.', + url: 'http://{username}.myopenid.com/' + }, + livejournal: { + name: 'LiveJournal', + label: 'Enter your Livejournal username.', + url: 'http://{username}.livejournal.com/' + }, + flickr: { + name: 'Flickr', + label: 'Enter your Flickr username.', + url: 'http://flickr.com/{username}/' + }, + technorati: { + name: 'Technorati', + label: 'Enter your Technorati username.', + url: 'http://technorati.com/people/technorati/{username}/' + }, + wordpress: { + name: 'Wordpress', + label: 'Enter your Wordpress.com username.', + url: 'http://{username}.wordpress.com/' + }, + blogger: { + name: 'Blogger', + label: 'Your Blogger account', + url: 'http://{username}.blogspot.com/' + }, + vidoop: { + name: 'Vidoop', + label: 'Your Vidoop username', + url: 'http://{username}.myvidoop.com/' + }, + claimid: { + name: 'ClaimID', + label: 'Your ClaimID username', + url: 'http://claimid.com/{username}' + } +}; +var providers = $.extend({}, providers_large, providers_small); + +var openid = { + + demo: false, + ajaxHandler: null, + cookie_expires: 6*30, // 6 months. + cookie_name: 'openid_provider', + cookie_path: '/', + + img_path: 'images/', + + input_id: null, + provider_url: null, + provider_id: null, + + init: function(input_id) { + + var openid_btns = $('#openid_btns'); + + this.input_id = input_id; + + $('#openid_choice').show(); + $('#openid_input_area').empty(); + + // add box for each provider + for (id in providers_large) { + + openid_btns.append(this.getBoxHTML(providers_large[id], 'large', '.gif')); + } + if (providers_small) { + openid_btns.append('
'); + + for (id in providers_small) { + + openid_btns.append(this.getBoxHTML(providers_small[id], 'small', '.ico')); + } + } + + $('#openid_form').submit(this.submit); + + var box_id = this.readCookie(); + if (box_id) { + this.signin(box_id, true); + } + }, + getBoxHTML: function(provider, box_size, image_ext) { + + var box_id = provider["name"].toLowerCase(); + return ''; + + }, + /* Provider image click */ + signin: function(box_id, onload) { + + var provider = providers[box_id]; + if (! provider) { + return; + } + + this.highlight(box_id); + this.setCookie(box_id); + + this.provider_id = box_id; + this.provider_url = provider['url']; + + // prompt user for input? + if (provider['label']) { + this.useInputBox(provider); + } else { + $('#openid_input_area').empty(); + if (! onload) { + $('#openid_form').submit(); + } + } + }, + /* Sign-in button click */ + submit: function() { + + var url = openid.provider_url; + if (url) { + url = url.replace('{username}', $('#openid_username').val()); + openid.setOpenIdUrl(url); + } + if(openid.ajaxHandler) { + openid.ajaxHandler(openid.provider_id, document.getElementById(openid.input_id).value); + return false; + } + if(openid.demo) { + alert("In client demo mode. Normally would have submitted OpenID:\r\n" + document.getElementById(openid.input_id).value); + return false; + } + return true; + }, + setOpenIdUrl: function (url) { + + var hidden = document.getElementById(this.input_id); + if (hidden != null) { + hidden.value = url; + } else { + $('#openid_form').append(''); + } + }, + highlight: function (box_id) { + + // remove previous highlight. + var highlight = $('#openid_highlight'); + if (highlight) { + highlight.replaceWith($('#openid_highlight a')[0]); + } + // add new highlight. + $('.'+box_id).wrap('
'); + }, + setCookie: function (value) { + + var date = new Date(); + date.setTime(date.getTime()+(this.cookie_expires*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + + document.cookie = this.cookie_name+"="+value+expires+"; path=" + this.cookie_path; + }, + readCookie: function () { + var nameEQ = this.cookie_name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; + }, + useInputBox: function (provider) { + + var input_area = $('#openid_input_area'); + + var html = ''; + var id = 'openid_username'; + var value = ''; + var label = provider['label']; + var style = ''; + + if (label) { + html = '

' + label + '

'; + } + if (provider['name'] == 'OpenID') { + id = this.input_id; + value = 'http://'; + style = 'background:#FFF url('+this.img_path+'openid-inputicon.gif) no-repeat scroll 0 50%; padding-left:18px;'; + } + html += '' + + ''; + + input_area.empty(); + input_area.append(html); + + $('#'+id).focus(); + }, + setDemoMode: function (demoMode) { + this.demo = demoMode; + }, + setAjaxHandler: function (ajaxFunction) { + this.ajaxHandler = ajaxFunction; + } +}; diff --git a/samples/openid/src/main/webapp/openidlogin.jsp b/samples/openid/src/main/webapp/openidlogin.jsp index 33a70df4e5..895e0cbeb0 100644 --- a/samples/openid/src/main/webapp/openidlogin.jsp +++ b/samples/openid/src/main/webapp/openidlogin.jsp @@ -1,33 +1,64 @@ <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %> + + + + + OpenID Login - - - Open ID Login - + + + + - -

Please Enter Your OpenID Identity

+ + - <%-- this form-login-page form is also used as the - form-error-page to ask for a login again. - --%> - - - Your login attempt was not successful, try again.

- Reason: . -
-
+ + + -
- - - - - -
OpenID Identity:
Remember me on this computer.
+ + + Your login attempt was not successful, try again.

+ Reason: . +
+
-
+ +
+ - +
+ Sign-in or Create New Account + +
+

Please click your account provider:

+
+ +
+ +
+ + +
+ +
+
+ + +