| Django-authtkt. µÑ ÀÌ»óÀÇ Django »çÀÌÆ® (ÀÏÁ¾ÀÇ SSO ÀÎÁõ) »çÀÌ¿¡ ÀÎÁõÀ» °øÀ¯ÇÏ´Â µ¥ »ç¿ëµË´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Django-authtkt. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://bearstech.com
Django-authtkt. ű×
Django-authtkt. ¼³¸í
µÑ ÀÌ»óÀÇ Django »çÀÌÆ® (Á¾·ùÀÇ SSO ÀÎÁõ) »çÀÌ¿¡ ÀÎÁõÀ» °øÀ¯ÇÏ´Â µ¥ »ç¿ëµË´Ï´Ù. Django-AuthTkt´Â Django ¾ÛÀ» »ç¿ëÇÏ´Â Django »çÀÌÆ® (ÀÏÁ¾ÀÇ SSO ÀÎÁõ). ÀÚµ¿ : AuthenticationMiddleware Àü¿¡ ¹Ìµå µå¸®¿þ¾î Ŭ·¡½º Ãß°¡ : middleware_classes = (... 'authtkt.middleware.authtktmiddleware', 'Django' CallbackYou´Â ÄݹéÀ» »ç¿ëÇÏ¿© ÄݹéÀ» »ç¿ëÇÏ¿© Á¦ 3 ÀÚ App.Settings : authtkt_callback = 'yourmodule : update_user'callback : sqlalchemy °¡Á® ¿À±â engine_from_config¿¡¼, Å×À̺í, metadataFrom django.conf °¡Á® ¿À±â ¼³Á¤ Djang update_user (»ç¿ëÀÚ) : ingine = engine_from_config ({ 'sqlalchemy.url': settings.user_db}) ¸ÞŸ µ¥ÀÌÅÍ = ¸ÞŸ µ¥ÀÌÅÍ (¿£Áø) »ç¿ëÀÚ = Å×À̺í ( 'auth_user', metadata, autoload = true) ·¹ÄÚµå = users.select (users.c.id == user.id) .execute (). k, v for record.items () : setAttr (User, STR (K), v) ¼öµ¿ ½Äº° / ÀØ¾î ¹ö¸² Usermanualy »ç¿ëÀÚ¸¦ ½Äº°ÇÕ´Ï´Ù (¿¹ : ÄíÅ° ¼¼Æ®). ¿Ã¹Ù¸¥ request.user : request.environ (¿¹ : ÄíÅ° Àç¼³Á¤) : request.environ (¿äû, ÀÀ´ä ) ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽㠡¤ Àå°í
Django-authtkt. °ü·Ã ¼ÒÇÁÆ®¿þ¾î