Get seconds since epoch (UTC). Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Access Authentication spec. .. _`section 3.2.1`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-3.2.1 .. _`section 3.3`: https://tools.ietf.org/html/
()
| 174 | |
| 175 | |
| 176 | def generate_timestamp(): |
| 177 | """Get seconds since epoch (UTC). |
| 178 | |
| 179 | Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. |
| 180 | Per `section 3.2.1`_ of the MAC Access Authentication spec. |
| 181 | |
| 182 | .. _`section 3.2.1`: https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01#section-3.2.1 |
| 183 | .. _`section 3.3`: https://tools.ietf.org/html/rfc5849#section-3.3 |
| 184 | """ |
| 185 | return str(int(time.time())) |
| 186 | |
| 187 | |
| 188 | def generate_token(length=30, chars=UNICODE_ASCII_CHARACTER_SET): |
no outgoing calls
searching dependent graphs…