oldaplib 0.2.7__py3-none-any.whl → 0.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oldaplib/src/connection.py +1 -5
- oldaplib/src/version.py +1 -1
- oldaplib/test/test_connection.py +8 -1
- {oldaplib-0.2.7.dist-info → oldaplib-0.2.8.dist-info}/METADATA +1 -1
- {oldaplib-0.2.7.dist-info → oldaplib-0.2.8.dist-info}/RECORD +6 -6
- {oldaplib-0.2.7.dist-info → oldaplib-0.2.8.dist-info}/WHEEL +0 -0
oldaplib/src/connection.py
CHANGED
|
@@ -250,11 +250,7 @@ class Connection(IConnection):
|
|
|
250
250
|
@property
|
|
251
251
|
def jwtkey(self) -> str:
|
|
252
252
|
"""Getter for the JWT token"""
|
|
253
|
-
return
|
|
254
|
-
|
|
255
|
-
@jwtkey.setter
|
|
256
|
-
def jwtkey(self, value: str) -> None:
|
|
257
|
-
self.__jwtkey = value
|
|
253
|
+
return Connection.__jwtkey
|
|
258
254
|
|
|
259
255
|
@property
|
|
260
256
|
def server(self) -> str:
|
oldaplib/src/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.8"
|
oldaplib/test/test_connection.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
1
3
|
import unittest
|
|
2
4
|
from datetime import datetime, timezone
|
|
3
5
|
from pathlib import Path
|
|
@@ -11,6 +13,7 @@ from oldaplib.src.enums.sparql_result_format import SparqlResultFormat
|
|
|
11
13
|
from oldaplib.src.helpers.context import Context
|
|
12
14
|
from oldaplib.src.dtypes.bnode import BNode
|
|
13
15
|
from oldaplib.src.dtypes.namespaceiri import NamespaceIRI
|
|
16
|
+
from oldaplib.src.helpers.serializer import serializer
|
|
14
17
|
from oldaplib.src.xsd.iri import Iri
|
|
15
18
|
from oldaplib.src.xsd.xsd_anyuri import Xsd_anyURI
|
|
16
19
|
from oldaplib.src.xsd.xsd_qname import Xsd_QName
|
|
@@ -113,11 +116,15 @@ class TestBasicConnection(unittest.TestCase):
|
|
|
113
116
|
|
|
114
117
|
#@unittest.skip('No longer used')
|
|
115
118
|
def test_token(self):
|
|
116
|
-
|
|
119
|
+
os.environ["OLDAP_JWT_SECRET"] = "This is a very special secret, yeah!"
|
|
117
120
|
con = Connection(userId="rosenth",
|
|
118
121
|
credentials="RioGrande",
|
|
119
122
|
context_name="DEFAULT")
|
|
120
123
|
token = con.token
|
|
124
|
+
tokendata = jwt.decode(jwt=token, key=con.jwtkey, algorithms="HS256")
|
|
125
|
+
userdata = json.loads(tokendata['userdata'], object_hook=serializer.decoder_hook)
|
|
126
|
+
self.assertEqual(userdata.userId, "rosenth")
|
|
127
|
+
|
|
121
128
|
con = Connection(token=token,
|
|
122
129
|
context_name="DEFAULT")
|
|
123
130
|
self.assertEqual(con.userid, Xsd_NCName("rosenth"))
|
|
@@ -7,7 +7,7 @@ oldaplib/ontologies/oldap.ttl,sha256=w4q5SX6UIeuYXI2nxNSxzsjZKfR5-mDoLaJXyODBUps
|
|
|
7
7
|
oldaplib/ontologies/shared.trig,sha256=Am3_Nrp1j6fr3W0CEns-RczBRX96mQD0T1GgSjdmvDY,17233
|
|
8
8
|
oldaplib/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
oldaplib/src/cachesingleton.py,sha256=RzQz5-rSAuqgF0TbkdHPwdOjoGxpHFqO8Fpips4AK54,3550
|
|
10
|
-
oldaplib/src/connection.py,sha256=
|
|
10
|
+
oldaplib/src/connection.py,sha256=pWYik6G6LZucG_kTiaJmSZFH39pGJKuXTyEfBgMkWj8,29012
|
|
11
11
|
oldaplib/src/datamodel.py,sha256=7jhqiFYT9fkn6cNTCn5Q7QfxSy29QyMrcVferPZLQrE,30309
|
|
12
12
|
oldaplib/src/dtypes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
oldaplib/src/dtypes/bnode.py,sha256=aPdm6FpqqFXCAtZJtOniLwIUFRcxK4XmwpCcg3PEnGc,1554
|
|
@@ -66,7 +66,7 @@ oldaplib/src/propertyclass.py,sha256=sOxK1S5SEGOoUqSKrV4hxWAluNMagnTnPFoo5JuuWEQ
|
|
|
66
66
|
oldaplib/src/resourceclass.py,sha256=DSuLMmgWutLUCbC1NuoBVwLHalDakeipMP3-NmnWx_g,98981
|
|
67
67
|
oldaplib/src/user.py,sha256=Z4GXPRkaHXx3glUpPXQdFqYMxQPOuqayDwkTAE5RGjU,48820
|
|
68
68
|
oldaplib/src/userdataclass.py,sha256=FbZkcRt0pKbOeqsZ7HbpwoKE-XPWH2AqpHG1GcsrBPo,12364
|
|
69
|
-
oldaplib/src/version.py,sha256=
|
|
69
|
+
oldaplib/src/version.py,sha256=o1__UKPJBP04AwK1eLp_8Kn-DBuf_dIX5-C7GgRlWNo,21
|
|
70
70
|
oldaplib/src/xsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
71
|
oldaplib/src/xsd/floatingpoint.py,sha256=rDReKqh0mXyc4F5wslgTUxbeGf3-PGERyughj5_62YI,8852
|
|
72
72
|
oldaplib/src/xsd/iri.py,sha256=tXOuDASdQ6k9KKp2wTO8H4K8yb-_o8jFPanua7wCHog,8269
|
|
@@ -113,7 +113,7 @@ oldaplib/src/xsd/xsd_unsignedlong.py,sha256=5fGH8_SAV1x6b0YGiIR44ZlJXjUiCUW6XHhC
|
|
|
113
113
|
oldaplib/src/xsd/xsd_unsignedshort.py,sha256=M1E8SDR33rPJ0jUpRkzcDCcJYg17YfVbaItTuJeEibc,1013
|
|
114
114
|
oldaplib/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
115
|
oldaplib/test/test_cache.py,sha256=6TGukPUruuj5BsZaPGZdIx9L7v39qB9jIKZkg_GkbW4,702
|
|
116
|
-
oldaplib/test/test_connection.py,sha256=
|
|
116
|
+
oldaplib/test/test_connection.py,sha256=TM9f17G5RCa2B5gGWVbVhoLL0CUW1JHoM12Brz4P73U,13390
|
|
117
117
|
oldaplib/test/test_context.py,sha256=cJJWzSiWpKq9UFhbScru_PdOAqaCWKB3f_lRzxcCm10,4939
|
|
118
118
|
oldaplib/test/test_datamodel.py,sha256=6hE50zzh6tGb2PKQ4sFk-C829OM5qWOdsJKR107dhgw,54377
|
|
119
119
|
oldaplib/test/test_dtypes.py,sha256=UVdlHNdJrJ5iujMWlwk9tOhRzouJYA8x0E-eLDXPmUo,8583
|
|
@@ -152,6 +152,6 @@ oldaplib/testdata/source_type.yaml,sha256=dSihKikw3O-IlGf6anj5KWMoBYLaweLVF1Zojm
|
|
|
152
152
|
oldaplib/testdata/test_move_left_of_toL.yaml,sha256=2m1OSQrQFlsCQxeJrjzBAO74LMprNDo_HuyrYGsOeXI,787
|
|
153
153
|
oldaplib/testdata/testlist.yaml,sha256=AT11nXEG81Sfyb-tr1gQV0H_dZBrOCcFuHf7YtL8P2g,1994
|
|
154
154
|
oldaplib/testit.http,sha256=qW7mnr6aNLXFG6lQdLgyhXILOPN6qc5iFVZclLyVvkY,303
|
|
155
|
-
oldaplib-0.2.
|
|
156
|
-
oldaplib-0.2.
|
|
157
|
-
oldaplib-0.2.
|
|
155
|
+
oldaplib-0.2.8.dist-info/METADATA,sha256=wNnchGmZcWFjEpxgCxWQtyemD8ESxLlfOx8aFvgCPQA,2803
|
|
156
|
+
oldaplib-0.2.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
157
|
+
oldaplib-0.2.8.dist-info/RECORD,,
|
|
File without changes
|