apisonator 2.100.2.pre1 → 3.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,25 +0,0 @@
1
- # This module encodes values in Redis for our tokens
2
- module ThreeScale
3
- module Backend
4
- module OAuth
5
- class Token
6
- module Value
7
- # Note: this module made more sense when it also supported end-users.
8
- # Given how simple the module is, we could get rid of it in a future
9
- # refactor.
10
-
11
- class << self
12
- # this method is used when creating tokens
13
- def for(app_id)
14
- app_id
15
- end
16
-
17
- def from(value)
18
- value
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,14 +0,0 @@
1
- xml.instruct!
2
- xml.oauth_access_tokens do
3
- @tokens.each do |t|
4
- # Some bright head leaked the -1 that Redis uses to indicate there is no TTL
5
- # associated with a key. The behaviour is inconsistent because somehow we
6
- # BOTH expect that a token with no TTL does not have a "ttl" attribute in
7
- # the generated XML and at the same time we expect (in some tests) that such
8
- # tokens have this field with a -1 value.
9
- #
10
- # Just enforce the ttl to be -1 when there is none.
11
- attrs = { :ttl => t.ttl || -1 }
12
- xml.oauth_access_token t.token, attrs
13
- end
14
- end
@@ -1,4 +0,0 @@
1
- xml.instruct!
2
- xml.application do
3
- xml.app_id @token_to_app_id
4
- end