CGI :: ¼¼¼Ç :: Auth.CGI ½ºÅ©¸³Æ®¸¦À§ÇÑ ÀÎÁõ µÈ ¼¼¼Ç | |
Áö±Ý ´Ù¿î·Îµå |
CGI :: ¼¼¼Ç :: Auth. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Jochen Lillich
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~geewiz/
CGI :: ¼¼¼Ç :: Auth. ű×
CGI :: ¼¼¼Ç :: Auth. ¼³¸í
CGI ½ºÅ©¸³Æ®¸¦À§ÇÑ ÀÎÁõ µÈ ¼¼¼Ç CGI :: Session :: Auth´Â À¥ ApplicationSCGI :: Session :: Auth´Â CGI ½ºÅ©¸³Æ®¿¡¼ ÀÎÁõÀ»À§ÇÑ ÇÊ¿äÇÑ ±â´ÉÀ» Á¦°øÇÏ´Â Perl Ŭ·¡½ºÀÔ´Ï´Ù. ±×°ÍÀº ¼¼¼Ç °ü¸®¸¦ À§ÇØ CGI :: ¼¼¼ÇÀ» »ç¿ëÇÏ°í »ç¿ëÀÚ ¹× ±×·ì µ¥ÀÌÅÍ Storage.cgi :: Session :: Auth´Â HTTP ÀÎÁõ ´ë¾ÈÀ» Á¦°øÇÕ´Ï´Ù. ¸ñÇ¥´Â ÇÁ·Î±×·¡¹Ö ÀÎÅÍÆäÀ̽º¸¦ °£´ÜÇÏ°Ô À¯ÁöÇÏ¸é¼ °¡´ÉÇÑ ÇÑ ¿øÈ°ÇÑ À¥ ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ÀÎÁõ ÇÁ·Î¼¼½º¸¦ ÅëÇÕÇÏ´Â °ÍÀÔ´Ï´Ù. »ç¿ëÀÚ À̸§°ú ¾ÏÈ£¸¦ ·Î±×ÀÎ ¾ç½ÄÀ¸·Î ÀÔ·ÂÇÏ¿© ½º½º·Î¸¦ ÀÎÁõ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº À¥ »çÀÌÆ® ¹æ¹®ÀÚ¸¦ ÀÎÁõÇÏ´Â °¡Àå ÀϹÝÀûÀÎ ¹æ¹ýÀÔ´Ï´Ù. ¶ÇÇÑ »ç¿ëÀÚ´Â ÀÚ½ÅÀÇ IP ÁÖ¼Ò·Î ÀÚµ¿ ÀÎÁõÀ»¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. ±ÇÇÑÀÌ ºÎ¿© µÈ »ç¿ëÀÚ°¡ ¼öµ¿À¸·Î ·Î±×ÀÎÇϵµ·Ï ±ÍÂú°Ô ÇÒ ¼ö ¾øÀ» ¶§ À¯¿ëÇÏÁö¸¸ °íÁ¤ µÈ IP ÁÖ¼ÒÀÇ ¹üÀ§·Î ½Äº° ÇÒ ¼ö ÀÖ½À´Ï´Ù .cgi :: Session :: Auth´Â »ç¿ëÀÚ À̸§, ¾ÏÈ£ ¹× ±×ÀÇ »ç¿ëÀÚ ID. »ç¿ëÀÚ ÇÁ·ÎÇÊÀº ÀÓÀÇÀÇ data.important¿¡ ´ëÇÑ Ãß°¡ Çʵ带 Æ÷ÇÔ ÇÒ ¼ö ÀÖ½À´Ï´Ù. Ŭ·¡½º CGI :: ¼¼¼Ç :: ÀÎÁõ ÀÚü´Â ½ÇÁ¦ ½ºÅ丮Áö ¹é¿£µå°¡¾ø´Â Ãß»ó ±âº» Ŭ·¡½º ÀÏ»ÓÀÔ´Ï´Ù (ºñ¹Ð¹øÈ£ '°Ô½ºÆ®'ÀÌÀÖ´Â »ç¿ëÀÚ '°Ô½ºÆ®¸¸ÀÌ ·Î±×ÀÎ ÇÒ ¼ö ÀÖÀ½). ...¿¡ ½ÇÁ¦ ÀÎÁõÀÌ ¼öÇàµÇ´Â ÀÚü _login () ¸Þ¼µå¸¦ ±¸ÇöÇÏ´Â ÀÚ½Ä Å¬·¡½º¸¦ ÆÄ»ý½ÃÄѾßÇÕ´Ï´Ù. ½Ä ³ëÇÁ°¡ CGI¸¦ »ç¿ëÇÕ´Ï´Ù. CGI :: ¼¼¼ÇÀ» »ç¿ëÇϽʽÿÀ. CGI :: Session :: Auth; # CGI °´Ã¼ Çì´õ, ÄíÅ° µî. ³» $ CGI = »õ·Î¿î CGI; # CGI :: ¼¼¼ÇÀ»À§ÇÑ ¼¼¼Ç °³Ã¼ ³» $ session = »õ CGI :: ¼¼¼Ç (Undef, $ CGI, {Directory => / tmp '}); # cgi :: session :: ÀÎÁõÀ»À§ÇÑ Auth °´Ã¼ My $ auth = new cgi :: session :: auth ({cgi => $ cgi, session => $ session}); $ auth-> authenticate (); # ¹æ¹®ÀÚ°¡ ÀÌ¹Ì ÀÌ¹Ì ·Î±×ÀÎ ÇÑ °æ¿ì ($ auth-> loggedin) {showsecretpage; } else {showloginPage; } ¿ä±¸ »çÇ× : ¡¤ Perl.
CGI :: ¼¼¼Ç :: Auth. °ü·Ã ¼ÒÇÁÆ®¿þ¾î