-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add all missing APIs * feat: add all missing APIs * feat: add all missing APIs
- Loading branch information
Showing
24 changed files
with
2,129 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
from setuptools import setup | ||
|
||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2021 The Casbin Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
class Adapter: | ||
def __init__(self): | ||
self.owner = "string" | ||
self.name = "string" | ||
self.createdTime = "string" | ||
self.type = "string" | ||
self.databaseType = "string" | ||
self.host = "string" | ||
self.port = 0 | ||
self.user = "string" | ||
self.password = "string" | ||
self.database = "string" | ||
self.table = "string" | ||
self.tableNamePrefix = "string" | ||
self.isEnabled = True | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Copyright 2021 The Casbin Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from .organization import Organization, ThemeData | ||
from .provider import Provider | ||
|
||
|
||
class ProviderItem: | ||
def __init__(self): | ||
self.owner = "string" | ||
self.name = "string" | ||
self.canSignUp = True | ||
self.canSignIn = True | ||
self.canUnlink = True | ||
self.prompted = True | ||
self.alertType = "string" | ||
self.rule = "string" | ||
self.provider = Provider | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ | ||
|
||
|
||
class SignupItem: | ||
def __init__(self): | ||
self.name = "string" | ||
self.visible = True | ||
self.required = True | ||
self.prompted = True | ||
self.rule = "string" | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ | ||
|
||
|
||
class Application: | ||
def __init__(self): | ||
self.owner = "string" | ||
self.name = "string" | ||
self.createdTime = "string" | ||
self.displayName = "string" | ||
self.logo = "string" | ||
self.homepageUrl = "string" | ||
self.description = "string" | ||
self.organization = "string" | ||
self.cert = "string" | ||
self.enablePassword = True | ||
self.enableSignUp = True | ||
self.enableSigninSession = True | ||
self.enableAutoSignin = True | ||
self.enableCodeSignin = True | ||
self.enableSamlCompress = True | ||
self.enableWebAuthn = True | ||
self.enableLinkWithEmail = True | ||
self.orgChoiceMode = "string" | ||
self.samlReplyUrl = "string" | ||
self.providers = [ProviderItem] | ||
self.signupItems = [SignupItem] | ||
self.grantTypes = ["string"] | ||
self.organizationObj = Organization | ||
self.tags = ["string"] | ||
self.clientId = "string" | ||
self.clientSecret = "string" | ||
self.redirectUris = ["string"] | ||
self.tokenFormat = "string" | ||
self.expireInHours = 0 | ||
self.refreshExpireInHours = 0 | ||
self.signupUrl = "string" | ||
self.signinUrl = "string" | ||
self.forgetUrl = "string" | ||
self.affiliationUrl = "string" | ||
self.termsOfUse = "string" | ||
self.signupHtml = "string" | ||
self.signinHtml = "string" | ||
self.themeData = ThemeData | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2021 The Casbin Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
class Cert: | ||
def __init__(self): | ||
self.name = "string" | ||
self.owner = "string" | ||
self.createdTime = "string" | ||
self.displayName = "string" | ||
self.type = "string" | ||
self.scope = "string" | ||
self.cryptoAlgorithm = "string" | ||
self.bitSize = 0 | ||
self.expireInYears = 0 | ||
self.certificate = "string" | ||
self.privateKey = "string" | ||
self.authorityPublicKey = "string" | ||
self.authorityRootPublicKey = "string" | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2021 The Casbin Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
class Enforcer: | ||
def __init__(self): | ||
self.owner = "string" | ||
self.name = "string" | ||
self.createdTime = "string" | ||
self.updatedTime = "string" | ||
self.displayName = "string" | ||
self.description = "string" | ||
self.model = "string" | ||
self.adapter = "string" | ||
self.isEnabled = True | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2021 The Casbin Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from .user import User | ||
|
||
|
||
class Group: | ||
def __init__(self): | ||
self.owner = "string" | ||
self.name = "string" | ||
self.createdTime = "string" | ||
self.updatedTime = "string" | ||
self.displayName = "string" | ||
self.manager = "string" | ||
self.contactEmail = "string" | ||
self.type = "string" | ||
self.parentId = "string" | ||
self.isTopGroup = True | ||
self.users = [User] | ||
self.title = "string" | ||
self.key = "string" | ||
self.children = [Group] | ||
self.isEnabled = True | ||
|
||
def __str__(self): | ||
return str(self.__dict__) | ||
|
||
def to_dict(self) -> dict: | ||
return self.__dict__ |
Oops, something went wrong.