Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 5251a0f

Browse files
committed
Added new message type: SecurityEventToken.
1 parent 1877447 commit 5251a0f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/oidcmsg/oauth2/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
from oidcmsg.message import REQUIRED_LIST_OF_SP_SEP_STRINGS
1313
from oidcmsg.message import REQUIRED_LIST_OF_STRINGS
1414
from oidcmsg.message import SINGLE_OPTIONAL_INT
15+
from oidcmsg.message import SINGLE_OPTIONAL_JSON
1516
from oidcmsg.message import SINGLE_OPTIONAL_STRING
1617
from oidcmsg.message import SINGLE_REQUIRED_BOOLEAN
18+
from oidcmsg.message import SINGLE_REQUIRED_INT
1719
from oidcmsg.message import SINGLE_REQUIRED_STRING
1820

1921
logger = logging.getLogger(__name__)
@@ -350,6 +352,20 @@ def verify(self, **kwargs):
350352
return True
351353

352354

355+
class SecurityEventToken(Message):
356+
c_param = {
357+
"iss": SINGLE_REQUIRED_STRING,
358+
"iat": SINGLE_REQUIRED_INT,
359+
"jti": SINGLE_REQUIRED_STRING,
360+
"aud": OPTIONAL_LIST_OF_STRINGS,
361+
"sub": SINGLE_OPTIONAL_STRING,
362+
"exp": SINGLE_OPTIONAL_INT,
363+
"events": SINGLE_OPTIONAL_JSON,
364+
"txt": SINGLE_OPTIONAL_STRING,
365+
"toe": SINGLE_OPTIONAL_INT
366+
}
367+
368+
353369
def factory(msgtype, **kwargs):
354370
"""
355371
Factory method that can be used to easily instansiate a class instance

0 commit comments

Comments
 (0)