@@ -39,27 +39,27 @@ class FlowStatus(Enum):
3939
4040class DeviceFlows (Base ):
4141 __tablename__ = "DeviceFlows"
42- user_code = Column (String (USER_CODE_LENGTH ), primary_key = True )
43- status = EnumColumn (FlowStatus , server_default = FlowStatus .PENDING .name )
44- creation_time = DateNowColumn ()
45- client_id = Column (String (255 ))
46- scope = Column (String (1024 ))
47- device_code = Column (String (128 ), unique = True ) # Should be a hash
48- id_token = NullColumn (JSON ())
42+ user_code = Column ("UserCode" , String (USER_CODE_LENGTH ), primary_key = True )
43+ status = EnumColumn ("Status" , FlowStatus , server_default = FlowStatus .PENDING .name )
44+ creation_time = DateNowColumn ("CreationTime" )
45+ client_id = Column ("ClientID" , String (255 ))
46+ scope = Column ("Scope" , String (1024 ))
47+ device_code = Column ("DeviceCode" , String (128 ), unique = True ) # Should be a hash
48+ id_token = NullColumn ("IDToken" , JSON ())
4949
5050
5151class AuthorizationFlows (Base ):
5252 __tablename__ = "AuthorizationFlows"
53- uuid = Column (Uuid (as_uuid = False ), primary_key = True )
54- status = EnumColumn (FlowStatus , server_default = FlowStatus .PENDING .name )
55- client_id = Column (String (255 ))
56- creation_time = DateNowColumn ()
57- scope = Column (String (1024 ))
58- code_challenge = Column (String (255 ))
59- code_challenge_method = Column (String (8 ))
60- redirect_uri = Column (String (255 ))
61- code = NullColumn (String (255 )) # Should be a hash
62- id_token = NullColumn (JSON ())
53+ uuid = Column ("UUID" , Uuid (as_uuid = False ), primary_key = True )
54+ status = EnumColumn ("Status" , FlowStatus , server_default = FlowStatus .PENDING .name )
55+ client_id = Column ("ClientID" , String (255 ))
56+ creation_time = DateNowColumn ("CretionTime" )
57+ scope = Column ("Scope" , String (1024 ))
58+ code_challenge = Column ("CodeChallenge" , String (255 ))
59+ code_challenge_method = Column ("CodeChallengeMethod" , String (8 ))
60+ redirect_uri = Column ("RedirectURI" , String (255 ))
61+ code = NullColumn ("Code" , String (255 )) # Should be a hash
62+ id_token = NullColumn ("IDToken" , JSON ())
6363
6464
6565class RefreshTokenStatus (Enum ):
@@ -85,13 +85,13 @@ class RefreshTokens(Base):
8585
8686 __tablename__ = "RefreshTokens"
8787 # Refresh token attributes
88- jti = Column (Uuid (as_uuid = False ), primary_key = True )
88+ jti = Column ("JTI" , Uuid (as_uuid = False ), primary_key = True )
8989 status = EnumColumn (
90- RefreshTokenStatus , server_default = RefreshTokenStatus .CREATED .name
90+ "Status" , RefreshTokenStatus , server_default = RefreshTokenStatus .CREATED .name
9191 )
92- creation_time = DateNowColumn ()
93- scope = Column (String (1024 ))
92+ creation_time = DateNowColumn ("CreationTime" )
93+ scope = Column ("Scope" , String (1024 ))
9494
9595 # User attributes bound to the refresh token
96- sub = Column (String (1024 ))
97- preferred_username = Column (String (255 ))
96+ sub = Column ("Sub" , String (1024 ))
97+ preferred_username = Column ("PreferredUsername" , String (255 ))
0 commit comments