What are the characteristics of an OAuth token?

后端 未结 7 2008
谎友^
谎友^ 2021-02-04 00:52

How many characters long can an oauth access token and oauth access secret be and what are the allowed characters? I need to store them in a d

7条回答
  •  余生分开走
    2021-02-04 01:04

    An OAuth token is conceptually an arbitrary-sized sequence of bytes, not characters. In URLs, it gets encoded using standard URL escaping mechanisms:

      unreserved = ALPHA, DIGIT, '-', '.', '_', '~'
    

    Everything not unreserved gets %-encoded.

    I'm not sure whether you just talk about the oauth_token parameter that gets passed around. Usually, additional parameters need to be stored and transmitted as well, such as oauth_token_secret, oauth_signature, etc. Some of them have different data types, for example, oauth_timestamp is an integer representing seconds since 1970 (encoded in decimal ASCII digits).

提交回复
热议问题