Closed aliev closed 2 months ago
Separate methods in storage to follow the interface segregation principle from SOLID.
aioauth/storage.py
BaseStorage
TokenStorage
create_token
get_token
revoke_token
AuthorizationCodeStorage
create_authorization_code
get_authorization_code
delete_authorization_code
ClientStorage
get_client
UserStorage
authenticate
tests/classes.py
Storage
aioauth/grant_type.py
GrantTypeBase
AuthorizationCodeGrantType
PasswordGrantType
RefreshTokenGrantType
ClientCredentialsGrantType
aioauth/response_type.py
ResponseTypeBase
ResponseTypeToken
ResponseTypeAuthorizationCode
ResponseTypeIdToken
ResponseTypeNone
aioauth/server.py
AuthorizationServer
For more details, open the Copilot Workspace session.
Separate methods in storage to follow the interface segregation principle from SOLID.
aioauth/storage.py
BaseStorage
class.TokenStorage
interface with methodscreate_token
,get_token
, andrevoke_token
.AuthorizationCodeStorage
interface with methodscreate_authorization_code
,get_authorization_code
, anddelete_authorization_code
.ClientStorage
interface with methodget_client
.UserStorage
interface with methodauthenticate
.tests/classes.py
Storage
class to implementTokenStorage
,AuthorizationCodeStorage
,ClientStorage
, andUserStorage
interfaces.aioauth/grant_type.py
GrantTypeBase
class to useTokenStorage
interface.AuthorizationCodeGrantType
class to useAuthorizationCodeStorage
interface.PasswordGrantType
class to useUserStorage
interface.RefreshTokenGrantType
class to useTokenStorage
interface.ClientCredentialsGrantType
class to useClientStorage
interface.aioauth/response_type.py
ResponseTypeBase
class to useClientStorage
interface.ResponseTypeToken
class to useTokenStorage
interface.ResponseTypeAuthorizationCode
class to useAuthorizationCodeStorage
interface.ResponseTypeIdToken
class to useAuthorizationCodeStorage
interface.ResponseTypeNone
class to useClientStorage
interface.aioauth/server.py
AuthorizationServer
class to useTokenStorage
,AuthorizationCodeStorage
,ClientStorage
, andUserStorage
interfaces.For more details, open the Copilot Workspace session.