a UˆCg§ã@s*dZddlZddlmZGdd„dƒZdS)zT Functionality for encoding/decoding access token - encoding_token - decoding_token éN)ÚConfigc@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚJWTz Security functionality cCsd|_tj|_dS)NZHS256)Ú_JWT__algorithmrÚQUERY_SECURE_KEYÚ _JWT__secure)Úself©rú>/home/cmiss/Jenkins/workspace/12-Labours-API/middleware/jwt.pyÚ__init__sz JWT.__init__cCst ||j|j¡}|S)z, Handler for encoding token )ÚjwtÚencoderr)rÚpayloadÚencodedrrr Úencoding_tokenszJWT.encoding_tokencCst ||j|j¡}|S)z, Handler for decoding token )r Údecoderr)rÚtokenÚdecodedrrr Údecoding_tokenszJWT.decoding_tokenN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrrrr r sr)rr Ú app.configrrrrrr Ús