| Django-Apikey. github.com/scoursen/django-apikey¿¡¼ django.based¿¡ ´ëÇÑ °£´ÜÇÑ Å° ÀÎÁõ |
Áö±Ý ´Ù¿î·Îµå |
Django-Apikey. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Jorge Eduardo Cardona
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://cenuage.com
Django-Apikey. ű×
Django-Apikey. ¼³¸í
github.com/scoursen/django-apikey¿¡ ´ëÇÑ django.based¿¡ ´ëÇÑ °£´ÜÇÑ Å° ÀÎÁõ Django-Apikey´Â Django¿¡ ´ëÇÑ ÁÖ¿ä ÀÎÁõÀ» Á¦°øÇÏ´Â Django ¾ÛÀÔ´Ï´Ù. django-piston°ú ½±°Ô »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. https://github.com/scoursen/django-apikey.installationpip ¼³Ä¡ Django-ApikeyConfigurationAdd 'apikey'¸¦ ¼³Á¤¿¡ ¼³Ä¡ÇϽʽÿÀ. installed_apps = (... 'apikey', ...) ¼³Á¤¿¡¼ APIKEY_AUTHORIZED_HEADER¸¦ ¼³Á¤ÇÏ¿© ±ÇÇÑ Çìµå¸¦ º¯°æÇÒ ¼ö ÀÖ½À´Ï´Ù. PDERAPIKEY_AUTHORIZATION_HEADER = 'app-authorization'o Piston°ú ÇÔ²² API ÀÎÁõÀ» Ãß°¡ÇϽʽÿÀ. Çڵ鷯¸¦ »ç¿ëÇϽʽÿÀ. Apikey.Auth °¡Á® ¿À±â ApikeYauthenticationFrom Piston.Handler °¡Á® ¿À±â BaseHandler °¡Á® ¿À±â BaseHandlerFrom PistonÀ» °¡Á® ¿À½Ê½Ã¿À. ¸®¼Ò½º import resourceFrom myApp.models impt itemclass itemHandler °¡Á® ¿À±â (BaseHandler) : lettel = ( 'get',) model = item def read (self) : return item.objects.all () handler = ÀÚ¿ø (handler = itemhandler, authentication = apikeyauthentication) )) Thanksthis ÇÁ·ÎÁ§Æ®´Â Steve Course https://github.com/scoursen/django-apikey Áß ÇϳªÀÌÁö¸¸ ¸î °¡Áö ´Ü¼øÈ°¡ ÀÖ½À´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽㠡¤ Àå°í
Django-Apikey. °ü·Ã ¼ÒÇÁÆ®¿þ¾î