From 57ce60fdd8b8a595f40d75e43e376fc7985753be Mon Sep 17 00:00:00 2001 From: MaxKey Date: Fri, 10 Jul 2020 08:43:34 +0800 Subject: [PATCH] separate sdk & connectors separate sdk & connectors --- maxkey-authentications/build.gradle | 1 - maxkey-client-sdk/.classpath | 25 - maxkey-client-sdk/.gitignore | 1 - maxkey-client-sdk/.project | 40 - .../org.eclipse.buildship.core.prefs | 11 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 113 --- .../.settings/org.eclipse.jdt.launching.prefs | 2 - .../org.eclipse.wst.common.component | 7 - ....eclipse.wst.common.project.facet.core.xml | 7 - .../.sts4-cache/classpath-data.json | 1 - maxkey-client-sdk/build.gradle | 12 - .../org/maxkey/client/crypto/Base64Utils.java | 139 --- .../org/maxkey/client/crypto/BytesUtils.java | 29 - .../org/maxkey/client/crypto/HexUtils.java | 80 -- .../maxkey/client/crypto/ReciprocalUtils.java | 250 ------ .../maxkey/client/http/ApacheHttpClient.java | 106 --- .../client/http/AuthorizationHeader.java | 83 -- .../java/org/maxkey/client/http/HttpVerb.java | 26 - .../org/maxkey/client/http/Parameter.java | 71 -- .../org/maxkey/client/http/ParameterList.java | 122 --- .../java/org/maxkey/client/http/Request.java | 492 ----------- .../org/maxkey/client/http/RequestTuner.java | 23 - .../java/org/maxkey/client/http/Response.java | 149 ---- .../org/maxkey/client/http/RestClient.java | 142 ---- .../org/maxkey/client/http/SignatureType.java | 24 - .../org/maxkey/client/http/package-info.java | 25 - .../org/maxkey/client/ltpa/LtpaUtils.java | 79 -- .../org/maxkey/client/oauth/OAuthClient.java | 216 ----- .../client/oauth/builder/ServiceBuilder.java | 188 ----- .../maxkey/client/oauth/builder/api/Api.java | 43 - .../oauth/builder/api/DefaultApi20.java | 91 -- .../client/oauth/builder/api/MaxkeyApi20.java | 83 -- .../builder/api/MaxkeyPasswordApi20.java | 101 --- .../client/oauth/builder/api/OAuthApi20.java | 151 ---- .../client/oauth/domain/BaseDomain.java | 340 -------- .../client/oauth/domain/BaseEntity.java | 40 - .../client/oauth/domain/OIDCAddress.java | 71 -- .../client/oauth/domain/OIDCUserInfo.java | 251 ------ .../maxkey/client/oauth/domain/UserInfo.java | 792 ------------------ .../exceptions/OAuthConnectionException.java | 31 - .../oauth/exceptions/OAuthException.java | 50 -- .../OAuthParametersMissingException.java | 43 - .../exceptions/OAuthSignatureException.java | 41 - .../extractors/AccessTokenExtractor.java | 36 - .../oauth/extractors/BaseStringExtractor.java | 38 - .../extractors/BaseStringExtractorImpl.java | 68 -- .../extractors/GsonJsonTokenExtractor.java | 49 -- .../oauth/extractors/HeaderExtractor.java | 36 - .../oauth/extractors/HeaderExtractorImpl.java | 69 -- .../oauth/extractors/JsonTokenExtractor.java | 44 - .../oauth/extractors/QQTokenExtractor.java | 53 -- .../extractors/RequestTokenExtractor.java | 36 - .../extractors/TokenExtractor20Impl.java | 62 -- .../oauth/extractors/TokenExtractorImpl.java | 64 -- .../client/oauth/model/OAuthConfig.java | 109 --- .../client/oauth/model/OAuthConstants.java | 63 -- .../client/oauth/model/OAuthRequest.java | 94 --- .../org/maxkey/client/oauth/model/Token.java | 305 ------- .../maxkey/client/oauth/model/Verifier.java | 47 -- .../oauth/oauth/OAuth20ServiceImpl.java | 122 --- .../oauth/oauth/OAuthPasswordService.java | 87 -- .../client/oauth/oauth/OAuthService.java | 73 -- .../client/oauth/services/Base64Encoder.java | 53 -- .../client/oauth/services/CommonsEncoder.java | 59 -- .../services/DatatypeConverterEncoder.java | 35 - .../services/HMACSha1SignatureService.java | 79 -- .../services/PlaintextSignatureService.java | 59 -- .../services/RSASha1SignatureService.java | 70 -- .../oauth/services/SignatureService.java | 45 - .../oauth/services/TimestampService.java | 42 - .../oauth/services/TimestampServiceImpl.java | 85 -- .../java/org/maxkey/client/package-info.java | 25 - .../maxkey/client/tokenbase/TokenUtils.java | 69 -- .../org/maxkey/client/utils/JsonUtils.java | 66 -- .../org/maxkey/client/utils/MapUtils.java | 42 - .../org/maxkey/client/utils/PathUtils.java | 80 -- .../maxkey/client/utils/Preconditions.java | 93 -- .../org/maxkey/client/utils/StreamUtils.java | 66 -- .../maxkey/client/utils/StringGenerator.java | 156 ---- .../web/authn/AuthenticationFilter.java | 119 --- .../client/web/authn/SingleSignOutFilter.java | 65 -- .../src/main/resources/log4j.properties | 40 - .../client/utils/PathUtilsFile.properties | 1 - .../client/oauth/test/MaxKey20Example.java | 85 -- .../client/oauth/test/MaxkeyPasswordDemo.java | 53 -- .../client/oauth/test/package-info.java | 25 - .../java/org/maxkey/client/utils/URLTest.java | 44 - .../org/maxkey/client/utils/package-info.java | 25 - .../java/org/maxkey/rest/RestClientTest.java | 51 -- maxkey-connectors/.classpath | 6 - maxkey-connectors/.project | 28 - .../.classpath | 36 - .../maxkey-connector-activedirectory/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 14 - .../.settings/org.eclipse.jdt.launching.prefs | 3 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../build.gradle | 17 - .../ActivedirectoryConsumerApplication.java | 73 -- .../Group2Activedirectory.java | 198 ----- .../Organization2Activedirectory.java | 141 ---- .../Password2Activedirectory.java | 103 --- .../UserInfo2Activedirectory.java | 288 ------- .../src/main/resources/application.properties | 48 -- .../maxkey-connector-base/.classpath | 36 - .../maxkey-connector-base/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 14 - .../.settings/org.eclipse.jdt.launching.prefs | 3 - .../org.eclipse.wst.common.component | 19 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-base/build.gradle | 16 - .../maxkey/connector/AbstractConnector.java | 70 -- .../org/maxkey/connector/GroupConnector.java | 50 -- .../connector/OrganizationConnector.java | 39 - .../maxkey/connector/PasswordConnector.java | 30 - .../maxkey/connector/UserInfoConnector.java | 40 - .../receiver/KafkaGroupsTopicReceiver.java | 72 -- .../receiver/KafkaOrgsTopicReceiver.java | 72 -- .../receiver/KafkaPasswordTopicReceiver.java | 67 -- .../receiver/KafkaUserInfoTopicReceiver.java | 72 -- .../maxkey-connector-dingding/.classpath | 36 - .../maxkey-connector-dingding/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-dingding/build.gradle | 17 - .../DingdingConsumerApplication.java | 72 -- .../connector/dingding/Group2Dingding.java | 170 ---- .../dingding/Organization2Dingding.java | 136 --- .../connector/dingding/Password2Dingding.java | 62 -- .../connector/dingding/UserInfo2Dingding.java | 157 ---- .../src/main/resources/application.properties | 47 -- .../maxkey-connector-feishu/.classpath | 36 - .../maxkey-connector-feishu/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-feishu/build.gradle | 17 - .../connector/FeishuConsumerApplication.java | 72 -- .../maxkey/connector/feishu/Group2Feishu.java | 170 ---- .../connector/feishu/Organization2Feishu.java | 136 --- .../connector/feishu/Password2Feishu.java | 62 -- .../connector/feishu/UserInfo2Feishu.java | 157 ---- .../src/main/resources/application.properties | 47 -- .../maxkey-connector-ldap/.classpath | 36 - .../maxkey-connector-ldap/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 14 - .../.settings/org.eclipse.jdt.launching.prefs | 3 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-ldap/build.gradle | 17 - .../connector/LdapConsumerApplication.java | 72 -- .../org/maxkey/connector/ldap/Group2Ldap.java | 170 ---- .../connector/ldap/Organization2Ldap.java | 136 --- .../maxkey/connector/ldap/Password2Ldap.java | 62 -- .../maxkey/connector/ldap/UserInfo2Ldap.java | 157 ---- .../src/main/resources/application.properties | 47 -- .../maxkey-connector-welink/.classpath | 36 - .../maxkey-connector-welink/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-welink/build.gradle | 17 - .../connector/WelinkConsumerApplication.java | 72 -- .../maxkey/connector/welink/Group2Welink.java | 170 ---- .../connector/welink/Organization2Welink.java | 136 --- .../connector/welink/Password2Welink.java | 62 -- .../connector/welink/UserInfo2Welink.java | 157 ---- .../src/main/resources/application.properties | 47 -- .../maxkey-connector-workweixin/.classpath | 36 - .../maxkey-connector-workweixin/.project | 41 - .../org.eclipse.buildship.core.prefs | 2 - .../org.eclipse.core.resources.prefs | 2 - .../org.eclipse.wst.common.component | 22 - ....eclipse.wst.common.project.facet.core.xml | 6 - .../org.springframework.ide.eclipse.prefs | 2 - .../maxkey-connector-workweixin/build.gradle | 17 - .../connector/WeixinConsumerApplication.java | 72 -- .../connector/workweixin/Group2Weixin.java | 170 ---- .../workweixin/Organization2Weixin.java | 136 --- .../connector/workweixin/Password2Weixin.java | 62 -- .../connector/workweixin/UserInfo2Weixin.java | 157 ---- .../src/main/resources/application.properties | 47 -- .../java/org/maxkey/util}/HttpEncoder.java | 11 +- .../java/org/maxkey/util}/HttpsTrusts.java | 2 +- .../org.eclipse.wst.common.component | 3 - .../maxkey-identity-rest/build.gradle | 1 - .../org.eclipse.wst.common.component | 3 - .../maxkey-identity-scim/build.gradle | 1 - .../maxkey-client-sdk-2.0.0.RELEASE.jar | Bin 0 -> 99193 bytes .../maxkey-protocol-authorize/build.gradle | 1 - .../maxkey-protocol-cas/build.gradle | 1 - .../maxkey-protocol-desktop/build.gradle | 1 - .../maxkey-protocol-extendapi/build.gradle | 1 - .../ExtendApiQQExmailDefaultAdapter.java | 2 +- .../maxkey-protocol-formbased/build.gradle | 1 - .../maxkey-protocol-oauth-2.0/build.gradle | 1 - .../endpoint/AuthorizationEndpoint.java | 20 +- .../maxkey-protocol-tokenbased/build.gradle | 1 - maxkey-web-manage/.project | 1 - maxkey-web-manage/build.gradle | 1 - maxkey-web-maxkey/.project | 1 - maxkey-web-maxkey/build.gradle | 1 - settings.gradle | 17 - 220 files changed, 17 insertions(+), 13295 deletions(-) delete mode 100644 maxkey-client-sdk/.classpath delete mode 100644 maxkey-client-sdk/.gitignore delete mode 100644 maxkey-client-sdk/.project delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-client-sdk/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-client-sdk/.sts4-cache/classpath-data.json delete mode 100644 maxkey-client-sdk/build.gradle delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/Base64Utils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/BytesUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/HexUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/ReciprocalUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/ApacheHttpClient.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/AuthorizationHeader.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/HttpVerb.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/Parameter.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/ParameterList.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/Request.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/RequestTuner.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/Response.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/RestClient.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/SignatureType.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/http/package-info.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/ltpa/LtpaUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/OAuthClient.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/ServiceBuilder.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/Api.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/DefaultApi20.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyApi20.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyPasswordApi20.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/OAuthApi20.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseDomain.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseEntity.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCAddress.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCUserInfo.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/UserInfo.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthConnectionException.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthException.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthParametersMissingException.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthSignatureException.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/AccessTokenExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractorImpl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/GsonJsonTokenExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractorImpl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/JsonTokenExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/QQTokenExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/RequestTokenExtractor.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractor20Impl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractorImpl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConfig.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConstants.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthRequest.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Token.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Verifier.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuth20ServiceImpl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthPasswordService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/Base64Encoder.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/CommonsEncoder.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/DatatypeConverterEncoder.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/HMACSha1SignatureService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/PlaintextSignatureService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/RSASha1SignatureService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/SignatureService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampService.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampServiceImpl.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/package-info.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/tokenbase/TokenUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/JsonUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/MapUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/PathUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/Preconditions.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StreamUtils.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StringGenerator.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/AuthenticationFilter.java delete mode 100644 maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/SingleSignOutFilter.java delete mode 100644 maxkey-client-sdk/src/main/resources/log4j.properties delete mode 100644 maxkey-client-sdk/src/main/resources/org/maxkey/client/utils/PathUtilsFile.properties delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxKey20Example.java delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxkeyPasswordDemo.java delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/package-info.java delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/client/utils/URLTest.java delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/client/utils/package-info.java delete mode 100644 maxkey-client-sdk/src/test/java/org/maxkey/rest/RestClientTest.java delete mode 100644 maxkey-connectors/.classpath delete mode 100644 maxkey-connectors/.project delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.project delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/ActivedirectoryConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Group2Activedirectory.java delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Organization2Activedirectory.java delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Password2Activedirectory.java delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/UserInfo2Activedirectory.java delete mode 100644 maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties delete mode 100644 maxkey-connectors/maxkey-connector-base/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-base/.project delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-base/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-base/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/AbstractConnector.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/GroupConnector.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/OrganizationConnector.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/PasswordConnector.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/UserInfoConnector.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaGroupsTopicReceiver.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaOrgsTopicReceiver.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaPasswordTopicReceiver.java delete mode 100644 maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaUserInfoTopicReceiver.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.project delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-dingding/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-dingding/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/DingdingConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Group2Dingding.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Organization2Dingding.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Password2Dingding.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/UserInfo2Dingding.java delete mode 100644 maxkey-connectors/maxkey-connector-dingding/src/main/resources/application.properties delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.project delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-feishu/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-feishu/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/FeishuConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Group2Feishu.java delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Organization2Feishu.java delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Password2Feishu.java delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/UserInfo2Feishu.java delete mode 100644 maxkey-connectors/maxkey-connector-feishu/src/main/resources/application.properties delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.project delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-ldap/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-ldap/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/LdapConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Group2Ldap.java delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Organization2Ldap.java delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Password2Ldap.java delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/UserInfo2Ldap.java delete mode 100644 maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties delete mode 100644 maxkey-connectors/maxkey-connector-welink/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-welink/.project delete mode 100644 maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-welink/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-welink/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/WelinkConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Group2Welink.java delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Organization2Welink.java delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Password2Welink.java delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/UserInfo2Welink.java delete mode 100644 maxkey-connectors/maxkey-connector-welink/src/main/resources/application.properties delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.classpath delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.project delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.buildship.core.prefs delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.core.resources.prefs delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.component delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/.settings/org.springframework.ide.eclipse.prefs delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/build.gradle delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/WeixinConsumerApplication.java delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Group2Weixin.java delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Organization2Weixin.java delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Password2Weixin.java delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/UserInfo2Weixin.java delete mode 100644 maxkey-connectors/maxkey-connector-workweixin/src/main/resources/application.properties rename {maxkey-client-sdk/src/main/java/org/maxkey/client/utils => maxkey-core/src/main/java/org/maxkey/util}/HttpEncoder.java (82%) rename {maxkey-client-sdk/src/main/java/org/maxkey/client/utils => maxkey-core/src/main/java/org/maxkey/util}/HttpsTrusts.java (98%) create mode 100644 maxkey-lib/maxkey-client-sdk-2.0.0.RELEASE.jar diff --git a/maxkey-authentications/build.gradle b/maxkey-authentications/build.gradle index db007659e..a3a0ad5c4 100644 --- a/maxkey-authentications/build.gradle +++ b/maxkey-authentications/build.gradle @@ -10,7 +10,6 @@ dependencies { compile project(":maxkey-core") compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0") compile project(":maxkey-protocols:maxkey-protocol-saml-2.0") diff --git a/maxkey-client-sdk/.classpath b/maxkey-client-sdk/.classpath deleted file mode 100644 index 319c4a47c..000000000 --- a/maxkey-client-sdk/.classpath +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-client-sdk/.gitignore b/maxkey-client-sdk/.gitignore deleted file mode 100644 index 84c048a73..000000000 --- a/maxkey-client-sdk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build/ diff --git a/maxkey-client-sdk/.project b/maxkey-client-sdk/.project deleted file mode 100644 index ef7f802bf..000000000 --- a/maxkey-client-sdk/.project +++ /dev/null @@ -1,40 +0,0 @@ - - - maxkey-client-sdk - maxkey-client-sdk - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - - diff --git a/maxkey-client-sdk/.settings/org.eclipse.buildship.core.prefs b/maxkey-client-sdk/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 216bf8377..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -build.commands=org.eclipse.jdt.core.javabuilder -connection.arguments= -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.java.home=null -connection.jvm.arguments= -connection.project.dir=.. -containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7/ -derived.resources=.gradle,build -eclipse.preferences.version=1 -natures=org.eclipse.jdt.core.javanature -project.path=\:maxkey-client-sdk diff --git a/maxkey-client-sdk/.settings/org.eclipse.core.resources.prefs b/maxkey-client-sdk/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs b/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 4248c7fd6..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,113 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullable.secondary= -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning -org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning -org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled -org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs b/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index d211d3263..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-client-sdk/.settings/org.eclipse.wst.common.component b/maxkey-client-sdk/.settings/org.eclipse.wst.common.component deleted file mode 100644 index ac100e060..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-client-sdk/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-client-sdk/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index fd0227a68..000000000 --- a/maxkey-client-sdk/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/maxkey-client-sdk/.sts4-cache/classpath-data.json b/maxkey-client-sdk/.sts4-cache/classpath-data.json deleted file mode 100644 index 8d521ed76..000000000 --- a/maxkey-client-sdk/.sts4-cache/classpath-data.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"maxkey-client-sdk","classpathEntries":[{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\resources.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\rt.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\jsse.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\jce.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\charsets.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Program Files\\Java\\jre1.8.0_221\\lib\\jfr.jar","javadocContainerUrl":"https://docs.oracle.com/javase/1/docs/api/","isSystem":true,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-beanutils\\commons-beanutils\\1.9.3\\c845703de334ddc6b4b3cd26835458cb1cba1f3d\\commons-beanutils-1.9.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-codec\\commons-codec\\1.12\\47a28ef1ed31eb182b44e15d49300dee5fadcf6a\\commons-codec-1.12.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-collections\\commons-collections\\3.2.2\\8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5\\commons-collections-3.2.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-csv\\1.7\\cb5d05520f8fe1b409aaf29962e47dc5764f8f39\\commons-csv-1.7.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-dbcp2\\2.6.0\\78d0e99c4bc815a9f20cf6837761e91b7fc6eef4\\commons-dbcp2-2.6.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-dbutils\\commons-dbutils\\1.7\\a2d6e515aa87e5d38f6b3003e70b13c1b1f19ca0\\commons-dbutils-1.7.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-digester3\\3.2\\c3f68c5ff25ec5204470fd8fdf4cb8feff5e8a79\\commons-digester3-3.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-digester\\commons-digester\\2.1\\73a8001e7a54a255eef0f03521ec1805dc738ca0\\commons-digester-2.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-io\\commons-io\\2.6\\815893df5f31da2ece4040fe0a12fd44b577afaf\\commons-io-2.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-lang\\commons-lang\\2.6\\ce1edb914c94ebc388f086c6827e8bdeec71ac2\\commons-lang-2.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-lang3\\3.9\\122c7cee69b53ed4a7681c03d4ee4c0e2765da5\\commons-lang3-3.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\commons-logging\\commons-logging\\1.2\\commons-logging-1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-pool2\\2.6.2\\775a8072995b29eafe8fb0a828a190589f71cede\\commons-pool2-2.6.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-httpclient\\commons-httpclient\\3.1\\964cd74171f427720480efdec40a7c7f6e58426a\\commons-httpclient-3.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\commons-fileupload\\commons-fileupload\\1.4\\f95188e3d372e20e7328706c37ef366e5d7859b0\\commons-fileupload-1.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\commons-email\\1.5\\e8e677c6362eba14ff3c476ba63ccb83132dbd52\\commons-email-1.5.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.httpcomponents\\httpclient\\4.5.6\\1afe5621985efe90a92d0fbc9be86271efbe796f\\httpclient-4.5.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.httpcomponents\\fluent-hc\\4.5.6\\7f4b2ccd83078e3bb87c8ad280ec074c04c7e4a4\\fluent-hc-4.5.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.httpcomponents\\httpclient-cache\\4.5.6\\4238cd34156021eaadc7e4d2d5c47b835e1fed3c\\httpclient-cache-4.5.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.httpcomponents\\httpmime\\4.5.6\\164343da11db817e81e24e0d9869527e069850c9\\httpmime-4.5.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.httpcomponents\\httpcore\\4.4.10\\acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b\\httpcore-4.4.10.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.velocity\\velocity\\1.7\\2ceb567b8f3f21118ecdec129fe1271dbc09aa7a\\velocity-1.7.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\velocity\\velocity-dep\\1.4\\b1df5193d3dd66a310b32828c547cd9e163b98df\\velocity-dep-1.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.freemarker\\freemarker\\2.3.29\\46005eeee02e4458520c85d0bcf5001467b053c3\\freemarker-2.3.29.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.commons\\not-yet-commons-ssl\\0.3.9\\7548f1f49b8a0b808b8715ead7b3cb2d395b0909\\not-yet-commons-ssl-0.3.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-1.2-api\\2.12.0\\29474790d2292384eac2ecf1b3280f095b6ac3f1\\log4j-1.2-api-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-api\\2.12.0\\8b50b487ac0c0bff1af79d56c6454ea68f40c150\\log4j-api-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-core\\2.12.0\\1723837573e4c5dbc8840f9f6e8f79b245b94bb\\log4j-core-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-jcl\\2.12.0\\c6b6cc2594e6481d1a8cf5762ed67bcab004363e\\log4j-jcl-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-jul\\2.12.0\\d50c2eb436de7128393c1fa1b71596c12462eb88\\log4j-jul-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-slf4j-impl\\2.12.0\\7f44f5201f79d6f7010a1515699a5f6c40e49cb\\log4j-slf4j-impl-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.logging.log4j\\log4j-web\\2.12.0\\93c550519d057e56c75ba5074ea4a258d1732b8b\\log4j-web-2.12.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.7.26\\slf4j-api-1.7.26.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.jboss.logging\\jboss-logging\\3.4.0.Final\\b225692a59f7dc3a789d2c85edc06041914e97e7\\jboss-logging-3.4.0.Final.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-aop\\5.2.2.RELEASE\\899739cf7f338f6297aa9eb25ea8b16338fe4e6d\\spring-aop-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-aspects\\5.2.2.RELEASE\\a7fc38ee5fcc7efff607cc93b5fa7259c0fbb4da\\spring-aspects-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-beans\\5.2.2.RELEASE\\81e4d9cc2e8fac88ab4eb7325c4521bd07c6389c\\spring-beans-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-core\\5.2.2.RELEASE\\bfcf2f6d0494d89db63ae170b8491223c93a88dc\\spring-core-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-context\\5.2.2.RELEASE\\a77a18fa425eba9c55447fa0711e2dbfbf71907b\\spring-context-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-context-indexer\\5.2.2.RELEASE\\f31f4b86f2a4c973834848917774f12c3d108b8a\\spring-context-indexer-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-context-support\\5.2.2.RELEASE\\f09e0177737a5be5c6b6315363bfff722e3524cb\\spring-context-support-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-expression\\5.2.2.RELEASE\\eb93bc4d4eb8e0bee60ea910e0fd615869336643\\spring-expression-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-instrument\\5.2.2.RELEASE\\73de68c900985304ef13ee3c4d313facf7fbf883\\spring-instrument-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-jcl\\5.2.2.RELEASE\\35efd564bf664c0bf53bd336b583391a7f872da7\\spring-jcl-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-jdbc\\5.2.2.RELEASE\\6f0070f04c60f77d0048dc5521f8aafd5a86e87e\\spring-jdbc-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-jms\\5.2.2.RELEASE\\a275151b739a85c3ef9003338231a3798a72a870\\spring-jms-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-messaging\\5.2.2.RELEASE\\93e22c86e57017e3093347e31bdb162b928999c9\\spring-messaging-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-orm\\5.2.2.RELEASE\\1b17c9e69d92e54439a092d6943e956f80392f43\\spring-orm-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-oxm\\5.2.2.RELEASE\\6bfabf762138bffaf1799f9d27d37f0ee7896722\\spring-oxm-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-test\\5.2.2.RELEASE\\444e2f91f667558df1853b15915ac28b2185404c\\spring-test-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-tx\\5.2.2.RELEASE\\2af860baa0b094e13786613e15e1804edb7a5977\\spring-tx-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-web\\5.2.2.RELEASE\\d9b0a8079b7d604f134e3054127a7aeba65949a5\\spring-web-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-webflux\\5.2.2.RELEASE\\610c4889b4e5087e2103fcfae32144af0321d06d\\spring-webflux-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-webmvc\\5.2.2.RELEASE\\a0e9e88a296c09850f92318872f4dee9f62c8c13\\spring-webmvc-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework\\spring-websocket\\5.2.2.RELEASE\\f751c66b60482096f97f28e196de25aaabc39668\\spring-websocket-5.2.2.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.security\\spring-security-core\\5.2.1.RELEASE\\f1265ecdd4636a2038768c2ab9da4b79961a3465\\spring-security-core-5.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.security\\spring-security-web\\5.2.1.RELEASE\\9e43c2d8d2dffc60bfba8ac95a106d30e9593106\\spring-security-web-5.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.security\\spring-security-crypto\\5.2.1.RELEASE\\77d7c803ab3f91231254509e37c51ee72651e0d7\\spring-security-crypto-5.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot\\2.2.1.RELEASE\\3acb07ca9d6b968209a91aec6a7751f35bf22764\\spring-boot-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter\\2.2.1.RELEASE\\5a4d687e6ffec805ce6320af7ca0b18798638200\\spring-boot-starter-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-actuator\\2.2.1.RELEASE\\6f91f2e1f75b06388b65da9d3ae54164ad427922\\spring-boot-actuator-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-autoconfigure\\2.2.1.RELEASE\\1e45b519cc3b1de0b1ecee6eed6397c19ede95a2\\spring-boot-autoconfigure-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter-freemarker\\2.2.1.RELEASE\\351b315a712c46a7680d944e63782b014920b3e5\\spring-boot-starter-freemarker-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter-log4j2\\2.2.1.RELEASE\\e4365822acf8b4300dae309206f75e6d12b9ac90\\spring-boot-starter-log4j2-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter-web\\2.2.1.RELEASE\\689213aca6e25e2aa9b377e61273aa3d31f30f60\\spring-boot-starter-web-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter-tomcat\\2.2.1.RELEASE\\da314ec9026c230906ea9d1a1330f99bbe2d0fa8\\spring-boot-starter-tomcat-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.opensaml\\opensaml\\2.6.4\\de2c742b770bd58328fd05ebd9d9efc85f79d88c\\opensaml-2.6.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.opensaml\\openws\\1.5.4\\942bd987e5956fcdf1eaa56cde87112ea871d0e8\\openws-1.5.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.opensaml\\xmltooling\\1.4.4\\8cf44998d4b9cca5f9eeb47cc95d95cea9f86714\\xmltooling-1.4.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\cn.hutool\\hutool-core\\5.1.2\\8952c0cb43272ba2873be46193971825d4b9f7d9\\hutool-core-5.1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\cn.hutool\\hutool-http\\5.1.2\\9f43596260cd0b8212a12f96051b1fa04ec0c5de\\hutool-http-5.1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.javassist\\javassist\\3.23.0-GA\\5c71cd6815cc207379639aca8c88478b7e959e35\\javassist-3.23.0-GA.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.owasp.esapi\\esapi\\2.2.0.0\\721cbbf80e2bf1cc3d87d4a791e4c7bc827fca95\\esapi-2.2.0.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.sun.mail\\javax.mail\\1.6.2\\935151eb71beff17a2ffac15dd80184a99a0514f\\javax.mail-1.6.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\taglibs\\standard\\1.1.2\\a17e8a4d9a1f7fcc5eed606721c9ed6b7f18acf7\\standard-1.1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.servlet.jsp.jstl\\jstl\\1.2\\7a93a178d5599db1321a9e5ff927b4ed015b68d8\\jstl-1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\javax\\activation\\activation\\1.1.1\\activation-1.1.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.annotation\\javax.annotation-api\\1.3.2\\934c04d3cfef185a8008e7bf34331b79730a9d43\\javax.annotation-api-1.3.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.transaction\\jta\\1.1\\2ca09f0b36ca7d71b762e14ea2ff09d5eac57558\\jta-1.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.transaction\\javax.transaction-api\\1.3\\e006adf5cf3cca2181d16bd640ecb80148ec0fce\\javax.transaction-api-1.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.validation\\validation-api\\2.0.1.Final\\cb855558e6271b1b32e716d24cb85c7f583ce09e\\validation-api-2.0.1.Final.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.xml\\jsr173\\1.0\\8b7a70786148944ef061fca58b5467d05dae07ba\\jsr173-1.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.xml.bind\\jaxb-api\\2.3.1\\8531ad5ac454cc2deb9d4d32c40c4d7451939b5d\\jaxb-api-2.3.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.sun.xml.bind\\jaxb-core\\2.3.0.1\\23574ca124d0a694721ce3ef13cd720095f18fdd\\jaxb-core-2.3.0.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.sun.xml.bind\\jaxb-impl\\2.3.2\\9d70d9b54cbc91b0e647d97af87395f39ea189f9\\jaxb-impl-2.3.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.sun.xml.bind\\jaxb-xjc\\2.3.2\\264a255681ebe9f9e955182c7922a34b5f7c4578\\jaxb-xjc-2.3.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.bouncycastle\\bcpkix-jdk15on\\1.60\\d0c46320fbc07be3a24eb13a56cee4e3d38e0c75\\bcpkix-jdk15on-1.60.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.bouncycastle\\bcprov-jdk15on\\1.60\\bd47ad3bd14b8e82595c7adaa143501e60842a84\\bcprov-jdk15on-1.60.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.bouncycastle\\bcprov-ext-jdk15on\\1.60\\faea4c950bbfa6e8882830f0266bc9185755d37\\bcprov-ext-jdk15on-1.60.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.google.crypto.tink\\tink\\1.2.2\\db27fd32f842b436ad07aecbe2934524473dc0ac\\tink-1.2.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.jhlabs\\filters\\2.0.235-1\\fff65ebe39d1097cee431087858b3caf957ecfb7\\filters-2.0.235-1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.github.penggle\\kaptcha\\2.3.2\\a3e13fd05bae905d67eafb40b712a1b624daef3b\\kaptcha-2.3.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.google.code.gson\\gson\\2.8.5\\f645ed69d595b24d4cf8b3fbb64cc505bede8829\\gson-2.8.5.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.codehaus.jackson\\jackson-all\\1.8.5\\a5549eaa90a63b20da244690f9ade851eaeb2d99\\jackson-all-1.8.5.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-databind\\2.9.9\\jackson-databind-2.9.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-core\\2.9.9\\jackson-core-2.9.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-annotations\\2.9.9\\jackson-annotations-2.9.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.fasterxml\\classmate\\1.5.0\\bc2d1d55f28e6dc0801d86cbd195debd81090d33\\classmate-1.5.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.alibaba\\fastjson\\1.2.62\\9243497a2f1f9d40d7d1d8d852f0abdc71955532\\fastjson-1.2.62.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.reactivestreams\\reactive-streams\\1.0.2\\323964c36556eb0e6209f65c1cef72b53b461ab8\\reactive-streams-1.0.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\io.projectreactor\\reactor-core\\3.2.10.RELEASE\\14b979abc580502c679d0b318814cef8b2066fce\\reactor-core-3.2.10.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\eu.tekul\\szxcvbn_2.9.2\\0.2\\cfac462aed38c7c0267a06993a3e3c2656807aae\\szxcvbn_2.9.2-0.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.quartz-scheduler\\quartz\\2.2.3\\d4d8ea088852beeb89f54d3040fe1cbaa8491dcd\\quartz-2.2.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\mysql\\mysql-connector-java\\5.1.48\\9140be77aafa5050bf4bb936d560cbacb5a6b5c1\\mysql-connector-java-5.1.48.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.alibaba\\druid\\1.1.21\\5b2a163e69c4afd223ca6f6f5ac440eec92c0249\\druid-1.1.21.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\redis.clients\\jedis\\3.0.1\\4e8f7e393f17e197b29f7b9481004ede8e154dcb\\jedis-3.0.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.ehcache\\ehcache\\3.5.3\\b81a3c3f1ba4feea2262d24f256fed501f2f4c48\\ehcache-3.5.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\org\\mybatis\\mybatis\\3.5.3\\mybatis-3.5.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.mybatis\\mybatis-spring\\2.0.3\\17472a85388c8d37c9ffefcc9ef0fc3edabcce02\\mybatis-spring-2.0.3.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.hibernate.validator\\hibernate-validator\\6.0.17.Final\\af73055fc4a103ab347c56e7da5a143d68a0170\\hibernate-validator-6.0.17.Final.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.hibernate.validator\\hibernate-validator-annotation-processor\\6.0.17.Final\\7e781852d08e29c11a7b35eea6fb534d7a453fd3\\hibernate-validator-annotation-processor-6.0.17.Final.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\net.jradius\\jradius-core\\1.1.5\\c216654b56044f331290628a2a3d40a0c5d50323\\jradius-core-1.1.5.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\net.jradius\\jradius-dictionary\\1.1.5\\a186921802d11779e3ee3adbe54636489dc1dfd3\\jradius-dictionary-1.1.5.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\joda-time\\joda-time\\2.10\\f66c8125d1057ffce6c4e29e624cac863e110e2b\\joda-time-2.10.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.yaml\\snakeyaml\\1.24\\13a9c0d6776483c3876e3ff9384f9bb55b17001b\\snakeyaml-1.24.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\net.sourceforge.nekohtml\\nekohtml\\1.9.22\\4f54af68ecb345f2453fb6884672ad08414154e3\\nekohtml-1.9.22.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.jdom\\jdom\\2.0.2\\d06c71e0df0ac4b94deb737718580ccce22d92e8\\jdom-2.0.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.google.zxing\\core\\3.4.0\\5264296c46634347890ec9250bc65f14b7362bf8\\core-3.4.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.google.guava\\guava\\27.1-jre\\e47b59c893079b87743cdcfb6f17ca95c08c592c\\guava-27.1-jre.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\ognl\\ognl\\3.2.9\\c582d2e2a7db6e57bfd169b6490cce64c7d245c0\\ognl-3.2.9.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\cglib\\cglib\\3.2.12\\16c0d1d8b5d50ea9ad38c1f6f9f1e35a42727bf0\\cglib-3.2.12.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm\\7.0\\d74d4ba0dee443f68fb2dcb7fcdb945a2cd89912\\asm-7.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.m2\\repository\\aopalliance\\aopalliance\\1.0\\aopalliance-1.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.aspectj\\aspectjtools\\1.9.4\\b907e51a8a6820926785b8933be3de4a021da90b\\aspectjtools-1.9.4.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\dom4j\\dom4j\\1.6.1\\5d3ccc056b6f056dbf0dddfdf43894b9065a8f94\\dom4j-1.6.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\xalan\\serializer\\2.7.2\\24247f3bb052ee068971393bdb83e04512bb1c3c\\serializer-2.7.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\xml-resolver\\xml-resolver\\1.2\\3d0f97750b3a03e0971831566067754ba4bfd68c\\xml-resolver-1.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.santuario\\xmlsec\\1.5.8\\d0b5e51f571069a86c9578ec15d6d7f9da8c0e76\\xmlsec-1.5.8.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.ogce\\xpp3\\1.1.6\\dc87e00ddb69341b46a3eb1c331c6fcebf6c8546\\xpp3-1.1.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.thoughtworks.xstream\\xstream\\1.4.10\\dfecae23647abc9d9fd0416629a4213a3882b101\\xstream-1.4.10.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\com.belerweb\\pinyin4j\\2.5.1\\ea23babfc45a078af5b73cd9f3401caad1f1b2a9\\pinyin4j-2.5.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.tomcat.embed\\tomcat-embed-core\\9.0.29\\207dc9ca4215853d96ed695862f9873001f02a4b\\tomcat-embed-core-9.0.29.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.apache.tomcat.embed\\tomcat-embed-logging-juli\\8.5.2\\eb8d86e9972274272133c73a976ea744d9086cf1\\tomcat-embed-logging-juli-8.5.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\junit\\junit\\4.11\\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\\junit-4.11.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\javax.servlet\\javax.servlet-api\\3.0.1\\6bf0ebb7efd993e222fc1112377b5e92a13b38dd\\javax.servlet-api-3.0.1.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\me.zhyd.oauth\\JustAuth\\1.13.2\\27f2b1dbaf7ac21f6c3d448885d14696ef8d70be\\JustAuth-1.13.2.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.springframework.boot\\spring-boot-starter-test\\2.2.1.RELEASE\\fae935b40f7a6b7eac7f5daef51e83c2ca978211\\spring-boot-starter-test-2.2.1.RELEASE.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\xmlunit\\xmlunit\\1.6\\adcae0aff916681dacd2b490e193f1119cd964a9\\xmlunit-1.6.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"C:\\Users\\Administrator\\.gradle\\caches\\modules-2\\files-2.1\\org.mockito\\mockito-all\\1.10.19\\539df70269cc254a58cccc5d8e43286b4a73bf30\\mockito-all-1.10.19.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-lib\\mybatis-jpa-extra-1.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"binary","path":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-lib\\mybatis-jpa-extra-2.1-api-1.0.jar","isSystem":false,"isOwn":false,"isTest":false,"isJavaContent":false},{"kind":"source","path":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-client-sdk\\src\\main\\java","outputFolder":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-client-sdk\\bin\\main","isSystem":false,"isOwn":true,"isTest":false,"isJavaContent":true},{"kind":"source","path":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-client-sdk\\src\\test\\java","outputFolder":"D:\\JavaIDE\\Workspaces\\maxkey\\MaxKey\\maxkey-client-sdk\\bin\\test","isSystem":false,"isOwn":true,"isTest":true,"isJavaContent":true}]} \ No newline at end of file diff --git a/maxkey-client-sdk/build.gradle b/maxkey-client-sdk/build.gradle deleted file mode 100644 index 294a6fab2..000000000 --- a/maxkey-client-sdk/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -description = "maxkey-client-sdk" - -dependencies { - /*compile group: 'commons-io', name: 'commons-io', version: '2.6' - compile group: 'commons-logging', name: 'commons-logging', version: '1.2' - compile group: 'log4j', name: 'log4j', version: '1.2.17' - compile group: 'org.slf4j', name: 'slf4j-api', version: '1.5.11' - compile group: 'commons-codec', name: 'commons-codec', version: '1.14' - compile group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '8.10' - compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6' - */ -} \ No newline at end of file diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/Base64Utils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/Base64Utils.java deleted file mode 100644 index 50f64364f..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/Base64Utils.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.crypto; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; - -import org.apache.commons.codec.binary.Base64; - - -/** - * Base64 Utils - * - * @author Crystal.Sea - * - */ -public final class Base64Utils { - - - - public static String encodeBase64(byte[] simple){ - String cipher=BytesUtils.bytes2String(Base64.encodeBase64(simple)); - return cipher; - } - - public static byte[] decoderBase64(String cipher){ - byte[] simple=Base64.decodeBase64(cipher); - return simple; - } - - public static String encode(String simple){ - return encodeBase64(simple.getBytes()); - } - - public static String encoder(byte[] simple){ - return encodeBase64(simple); - } - - public static String decode(String cipher){ - return BytesUtils.bytes2String(decoderBase64(cipher)); - } - - public static byte[] decoder(String cipher){ - return decoderBase64(cipher); - } - - - /** - *encode file to base64 Code String - * @param fileName file path - * @return * - * @throws Exception - */ - - public static String fileToBase64(String fileName) throws Exception { - File file = new File(fileName);; - FileInputStream inputFile = new FileInputStream(file); - byte[] buffer = new byte[(int) file.length()]; - inputFile.read(buffer); - inputFile.close(); - return encodeBase64(buffer); - - } - - /** - * base64 Code decode String save to targetPath - * @param base64Code - * @param targetPath - * @throws Exception - */ - - public static void decodeBase64ToFile(String base64Code, String targetPath) - throws Exception { - byte[] buffer = decoderBase64(base64Code); - FileOutputStream out = new FileOutputStream(targetPath); - out.write(buffer); - out.close(); - - } - - /** - * base64 code save to file - * @param base64Code - * @param targetPath - * @throws Exception - */ - - public static void base64ToFile(String base64Code, String targetPath) - throws Exception { - byte[] buffer = base64Code.getBytes(); - FileOutputStream out = new FileOutputStream(targetPath); - out.write(buffer); - out.close(); - } - - public static String base64UrlEncode(byte[] simple) { - String s = new String(Base64.encodeBase64(simple)); // Regular base64 - // encoder - s = s.split("=")[0]; // Remove any trailing '='s - s = s.replace('+', '-'); // 62nd char of encoding - s = s.replace('/', '_'); // 63rd char of encoding - return s; - } - - public static byte[] base64UrlDecode(String cipher) { - String s = cipher; - s = s.replace('-', '+'); // 62nd char of encoding - s = s.replace('_', '/'); // 63rd char of encoding - switch (s.length() % 4) { // Pad with trailing '='s - case 0: - break; // No pad chars in this case - case 2: - s += "=="; - break; // Two pad chars - case 3: - s += "="; - break; // One pad char - default: - System.err.println("Illegal base64url String!"); - } - return Base64.decodeBase64(s); // Standard base64 decoder - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/BytesUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/BytesUtils.java deleted file mode 100644 index dec637e6b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/BytesUtils.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.crypto; - -public final class BytesUtils { - - public static String bytes2String(byte[] bytesArray) { - String result = ""; - for (Byte bts : bytesArray) { - result += (char) bts.intValue(); - } - return result; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/HexUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/HexUtils.java deleted file mode 100644 index 02b8baf29..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/HexUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -package org.maxkey.client.crypto; - -import java.io.UnsupportedEncodingException; - -/** - * @author Crystal.Sea - * - */ -public final class HexUtils { - - static final byte[] HEX_CHAR_TABLE = { - (byte) '0', (byte) '1',(byte) '2',(byte) '3', (byte) '4',(byte) '5', (byte) '6', (byte) '7', - (byte) '8', (byte) '9',(byte) 'a', (byte) 'b',(byte) 'c',(byte) 'd', (byte) 'e', (byte) 'f' - }; - - - public static String hex2String(byte[] b) { - String result = ""; - for (int i = 0; i < b.length; i++) { - result += Integer.toString((b[i] & 0xff) + 0x100, 16).substring(1); - } - return result; - } - - public static String bytes2HexString(byte[] raw) { - byte[] hex = new byte[2 * raw.length]; - int index = 0; - - for (byte b : raw) { - int v = b & 0xFF; - hex[index++] = HEX_CHAR_TABLE[v >>> 4]; - hex[index++] = HEX_CHAR_TABLE[v & 0xF]; - } - String s = ""; - try { - s = new String(hex, "ASCII"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - return s; - } - - public static byte[] hex2Bytes(char[] hex) { - int length = hex.length / 2; - byte[] raw = new byte[length]; - for (int i = 0; i < length; i++) { - int high = Character.digit(hex[i * 2], 16); - int low = Character.digit(hex[i * 2 + 1], 16); - int value = (high << 4) | low; - if (value > 127) - value -= 256; - raw[i] = (byte) value; - } - return raw; - } - - public static byte[] hex2Bytes(String hex) { - return hex2Bytes(hex.toCharArray()); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/ReciprocalUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/ReciprocalUtils.java deleted file mode 100644 index 666226124..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/crypto/ReciprocalUtils.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -package org.maxkey.client.crypto; - -import java.io.UnsupportedEncodingException; -import java.security.SecureRandom; -import java.security.Security; - -import javax.crypto.Cipher; -import javax.crypto.KeyGenerator; -import javax.crypto.SecretKey; -import javax.crypto.spec.SecretKeySpec; - -import org.apache.commons.logging.LogFactory; -import org.maxkey.client.utils.StringGenerator; - - -/** - * Reciprocal cipher or Symmetric-key algorithm - * - * algorithm Support DES,DESede,Blowfish and AES - * - * default key value use ReciprocalUtils.defaultKey - * - * generateKey is generate random key for algorithm - * - * @author Crystal.Sea - * - */ -public final class ReciprocalUtils { - - private static final String defaultKey= "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; // - - public final class Algorithm { - public static final String DES = "DES"; - public static final String DESede = "DESede"; - public static final String Blowfish = "Blowfish"; - public static final String AES = "AES"; - } - - public static byte[] encode(byte[] simpleBytes, SecretKey secretKey,String algorithm) { - // Create the ciphers - Cipher ecipher; - byte[] byteFinal = null; - try { - ecipher = Cipher.getInstance(secretKey.getAlgorithm()); - // Encode the string into bytes using utf-8 - ecipher.init(Cipher.ENCRYPT_MODE, secretKey); - // Encrypt - byteFinal = ecipher.doFinal(simpleBytes); - return byteFinal; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * @param simple - * @param secretKey - * must length - * @return - * @throws Exception - */ - public static byte[] encode(String simple, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - SecretKey key = generatorKey(secretKey, algorithm); - try { - return encode(simple.getBytes("UTF-8"), key, algorithm); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - return null; - } - - public static byte[] decoder(byte[] ciphersBytes, SecretKey secretKey,String algorithm) { - Cipher cipher; - byte[] byteFinal = null; - try { - cipher = Cipher.getInstance(algorithm); - cipher.init(Cipher.DECRYPT_MODE, secretKey); - byteFinal = cipher.doFinal(ciphersBytes); - // String simple=new String(byteFinal, "UTF8" ); - // return simple; - return byteFinal; - } catch (Exception e) { - e.printStackTrace(); - } finally { - cipher = null; - } - return null; - } - - public static String decoder(byte[] ciphersBytes, String secretKey,String algorithm) { - if (keyLengthCheck(secretKey, algorithm)) { - SecretKey key = generatorKey(secretKey, algorithm); - try { - return new String(decoder(ciphersBytes, key, algorithm), "UTF8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - return null; - } - - private static SecretKey generatorDefaultKey(String algorithm) { - try { - Security.addProvider(new com.sun.crypto.provider.SunJCE()); - KeyGenerator _generator = KeyGenerator.getInstance(algorithm); - _generator.init(new SecureRandom(defaultKey.getBytes())); - SecretKey key = _generator.generateKey(); - _generator = null; - return key; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - private static SecretKey generatorKey(String secretKey, String algorithm) { - try { - SecretKey key = new SecretKeySpec(secretKey.getBytes(), algorithm); - return key; - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - - - private static boolean keyLengthCheck(String secretKey,String algorithm){ - boolean lengthCheck=false; - if(algorithm.equals(Algorithm.DES)){ - if(secretKey.length()==8){ - lengthCheck=true; - }else{ - LogFactory.getLog(ReciprocalUtils.class).debug("key length is "+secretKey.getBytes().length+" ,must lequal 8"); - } - }else if(algorithm.equals(Algorithm.DESede)){ - if(secretKey.length()==24){ - lengthCheck=true; - }else{ - LogFactory.getLog(ReciprocalUtils.class).debug("key length is "+secretKey.getBytes().length+" ,must equal 24"); - } - }else if(algorithm.equals(Algorithm.AES)){ - if(secretKey.length()==16){ - lengthCheck=true; - }else{ - LogFactory.getLog(ReciprocalUtils.class).debug("key length is "+secretKey.getBytes().length+" ,must equal 16"); - } - }else if(algorithm.equals(Algorithm.Blowfish)){ - if(secretKey.length()<= 16){ - lengthCheck=true; - }else{ - LogFactory.getLog(ReciprocalUtils.class).debug("key length is "+secretKey.getBytes().length+" ,must be less then 16"); - } - } - return lengthCheck; - } - - public static byte[] encodeByDefaultKey(String simple, String algorithm) { - SecretKey key = generatorDefaultKey(algorithm); - return encode(simple.getBytes(), key, algorithm); - - } - - public static String encode2HexByDefaultKey(String simple, String algorithm) { - byte[] byteFinal = encodeByDefaultKey(simple, algorithm); - - String cipherHex = HexUtils.bytes2HexString(byteFinal); - return cipherHex; - } - - public static byte[] decoderByDefaultKey(byte[] byteCiphers,String algorithm) { - SecretKey key = generatorDefaultKey(algorithm); - return decoder(byteCiphers, key, algorithm); - - } - - public static String decoderHexByDefaultKey(String ciphers, String algorithm) { - byte[] byteSimple = HexUtils.hex2Bytes(ciphers); - byte[] byteFinal = decoderByDefaultKey(byteSimple, algorithm); - - String simple = null; - try { - simple = new String(byteFinal, "UTF-8"); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return simple; - - } - - /** - * encode by defaultKey with Algorithm.AES - * - * @param simple - * @return Hex - */ - public static String encode(String simple) { - return encode2HexByDefaultKey(simple, Algorithm.AES); - } - - /** - * decoder by defaultKey with Algorithm.AES - * - * @param ciphers is HEX - * - * @return - */ - public static String decoder(String ciphers) { - return decoderHexByDefaultKey(ciphers, Algorithm.AES); - } - - public static String generateKey(String algorithm){ - if(algorithm.equals(Algorithm.DES)){ - return (new StringGenerator(8)).randomGenerate(); - }else if(algorithm.equals(Algorithm.AES)){ - return (new StringGenerator(16)).randomGenerate(); - }else if(algorithm.equals(Algorithm.Blowfish)){ - return (new StringGenerator(16)).randomGenerate(); - }else if(algorithm.equals(Algorithm.DESede)){ - return (new StringGenerator(24)).randomGenerate(); - }else{ - return (new StringGenerator()).uniqueGenerate(); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ApacheHttpClient.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ApacheHttpClient.java deleted file mode 100644 index 75bfe9751..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ApacheHttpClient.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.maxkey.client.http; - -/* -public class ApacheHttpClient{ - - private final CloseableHttpAsyncClient client; - - public ApacheHttpClient() { - this(ApacheHttpClientConfig.defaultConfig()); - } - - public ApacheHttpClient(ApacheHttpClientConfig config) { - this(config.getHttpAsyncClientBuilder()); - } - - public ApacheHttpClient(HttpAsyncClientBuilder builder) { - this(builder.build()); - } - - public ApacheHttpClient(CloseableHttpAsyncClient client) { - this.client = client; - this.client.start(); - } - - @Override - public void close() throws IOException { - client.close(); - } - - @Override - public Future executeAsync(String userAgent, Map headers, Verb httpVerb, String completeUrl, - byte[] bodyContents, OAuthAsyncRequestCallback callback, OAuthRequest.ResponseConverter converter) { - final HttpEntity entity = bodyContents == null ? null : new ByteArrayEntity(bodyContents); - return doExecuteAsync(userAgent, headers, httpVerb, completeUrl, entity, callback, converter); - } - - @Override - public Future executeAsync(String userAgent, Map headers, Verb httpVerb, String completeUrl, - MultipartPayload bodyContents, OAuthAsyncRequestCallback callback, - OAuthRequest.ResponseConverter converter) { - - throw new UnsupportedOperationException("ApacheHttpClient does not support MultipartPayload yet."); - } - - @Override - public Future executeAsync(String userAgent, Map headers, Verb httpVerb, String completeUrl, - String bodyContents, OAuthAsyncRequestCallback callback, OAuthRequest.ResponseConverter converter) { - final HttpEntity entity = bodyContents == null ? null : new StringEntity(bodyContents, StandardCharsets.UTF_8); - return doExecuteAsync(userAgent, headers, httpVerb, completeUrl, entity, callback, converter); - } - - @Override - public Future executeAsync(String userAgent, Map headers, Verb httpVerb, String completeUrl, - File bodyContents, OAuthAsyncRequestCallback callback, OAuthRequest.ResponseConverter converter) { - final HttpEntity entity = bodyContents == null ? null : new FileEntity(bodyContents); - return doExecuteAsync(userAgent, headers, httpVerb, completeUrl, entity, callback, converter); - } - - private Future doExecuteAsync(String userAgent, Map headers, Verb httpVerb, - String completeUrl, HttpEntity entity, OAuthAsyncRequestCallback callback, - OAuthRequest.ResponseConverter converter) { - final RequestBuilder builder = getRequestBuilder(httpVerb); - builder.setUri(completeUrl); - - if (httpVerb.isPermitBody()) { - if (!headers.containsKey(CONTENT_TYPE)) { - builder.addHeader(CONTENT_TYPE, DEFAULT_CONTENT_TYPE); - } - builder.setEntity(entity); - } - - for (Map.Entry header : headers.entrySet()) { - builder.addHeader(header.getKey(), header.getValue()); - } - - if (userAgent != null) { - builder.setHeader(OAuthConstants.USER_AGENT_HEADER_NAME, userAgent); - } - final OAuthAsyncCompletionHandler handler = new OAuthAsyncCompletionHandler<>(callback, converter); - final Future future = client.execute(builder.build(), handler); - return new ApacheHttpFuture<>(future, handler); - } - - private static RequestBuilder getRequestBuilder(Verb httpVerb) { - switch (httpVerb) { - case GET: - return RequestBuilder.get(); - case PUT: - return RequestBuilder.put(); - case DELETE: - return RequestBuilder.delete(); - case HEAD: - return RequestBuilder.head(); - case POST: - return RequestBuilder.post(); - case PATCH: - return RequestBuilder.patch(); - case TRACE: - return RequestBuilder.trace(); - case OPTIONS: - return RequestBuilder.options(); - default: - throw new IllegalArgumentException("message build error: unknown verb type"); - } - } -}*/ \ No newline at end of file diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/AuthorizationHeader.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/AuthorizationHeader.java deleted file mode 100644 index c7c71dd0b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/AuthorizationHeader.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import org.maxkey.client.crypto.Base64Utils; - - -/** - * @author Crystal.Sea - * - */ -public class AuthorizationHeader { - - public static String AUTHORIZATION_HEADERNAME="Authorization"; - - public static String BASIC="Basic "; - - public static String BEARER="Bearer "; - - public static String createBasic( String username, String password ){ - String authUserPass = username + ":" + password; - String encodedAuthUserPass = Base64Utils.encode(authUserPass ); - return BASIC + encodedAuthUserPass; - } - - public static String [] resolveBasic( String basic ){ - if(isBasic(basic)){ - String[] userPass =basic.split(" "); - String decodeUserPass = Base64Utils.decode(userPass[1] ); - return decodeUserPass.split(":"); - }else{ - return null; - } - } - - public static boolean isBasic( String basic ){ - if(basic.startsWith(BASIC )){ - return true; - }else{ - return false; - } - } - - public static String resolveBearer( String bearer ){ - if(isBearer(bearer)){ - return bearer.split(" ")[1]; - }else{ - return null; - } - } - - - public static String createBearer(String bearer){ - return BEARER +bearer; - } - - - - public static boolean isBearer( String bearer ){ - if(bearer.startsWith(BEARER )){ - return true; - }else{ - return false; - } - } - - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/HttpVerb.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/HttpVerb.java deleted file mode 100644 index 741f66ccc..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/HttpVerb.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -/** - * An enumeration containing the most common HTTP Verbs. - */ -public enum HttpVerb { - - GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, PATCH -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Parameter.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Parameter.java deleted file mode 100644 index ec317840b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Parameter.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import org.maxkey.client.utils.HttpEncoder; - -public class Parameter implements Comparable { - - private final String key; - private final String value; - - public Parameter(String key, String value) { - this.key = key; - this.value = value; - } - - public String asUrlEncodedPair() { - return HttpEncoder.encode(key).concat("=").concat(HttpEncoder.encode(value)); - } - - @Override - public boolean equals(Object other) { - if (other == null) { - return false; - } - if (other == this) { - return true; - } - if (!(other instanceof Parameter)) { - return false; - } - - final Parameter otherParam = (Parameter) other; - return otherParam.getKey().equals(key) && otherParam.getValue().equals(value); - } - - public String getKey() { - return key; - } - - public String getValue() { - return value; - } - - @Override - public int hashCode() { - return key.hashCode() + value.hashCode(); - } - - @Override - public int compareTo(Parameter parameter) { - final int keyDiff = key.compareTo(parameter.getKey()); - - return keyDiff == 0 ? value.compareTo(parameter.getValue()) : keyDiff; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ParameterList.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ParameterList.java deleted file mode 100644 index 347890c3e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/ParameterList.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -public class ParameterList { - - private static final char QUERY_STRING_SEPARATOR = '?'; - private static final String PARAM_SEPARATOR = "&"; - private static final String PAIR_SEPARATOR = "="; - private static final String EMPTY_STRING = ""; - - private final List params; - - public ParameterList() { - params = new ArrayList<>(); - } - - ParameterList(List params) { - this.params = new ArrayList<>(params); - } - - public ParameterList(Map map) { - this(); - if (map != null && !map.isEmpty()) { - for (Map.Entry entry : map.entrySet()) { - params.add(new Parameter(entry.getKey(), entry.getValue())); - } - } - } - - public void add(String key, String value) { - params.add(new Parameter(key, value)); - } - - public String appendTo(String url) { - Preconditions.checkNotNull(url, "Cannot append to null URL"); - final String queryString = asFormUrlEncodedString(); - if (queryString.equals(EMPTY_STRING)) { - return url; - } else { - return url - + (url.indexOf(QUERY_STRING_SEPARATOR) == -1 ? QUERY_STRING_SEPARATOR : PARAM_SEPARATOR) - + queryString; - } - } - - public String asOauthBaseString() { - return HttpEncoder.encode(asFormUrlEncodedString()); - } - - public String asFormUrlEncodedString() { - if (params.isEmpty()) { - return EMPTY_STRING; - } - - final StringBuilder builder = new StringBuilder(); - for (Parameter p : params) { - builder.append(PARAM_SEPARATOR).append(p.asUrlEncodedPair()); - } - return builder.substring(1); - } - - public void addAll(ParameterList other) { - params.addAll(other.getParams()); - } - - public void addQuerystring(String queryString) { - if (queryString != null && !queryString.isEmpty()) { - for (String param : queryString.split(PARAM_SEPARATOR)) { - try{ - final String[] pair = param.split(PAIR_SEPARATOR); - final String key = HttpEncoder.decode(pair[0]); - final String value = pair.length > 1 ? HttpEncoder.decode(pair[1]) : EMPTY_STRING; - params.add(new Parameter(key, value)); - }catch(Exception e){ - - } - } - } - } - - public boolean contains(Parameter param) { - return params.contains(param); - } - - public int size() { - return params.size(); - } - - public List getParams() { - return params; - } - - public ParameterList sort() { - final ParameterList sorted = new ParameterList(params); - Collections.sort(sorted.getParams()); - return sorted; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Request.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Request.java deleted file mode 100644 index d084cb0f5..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Request.java +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import java.io.*; -import java.net.*; -import java.nio.charset.*; -import java.util.*; -import java.util.concurrent.*; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.utils.HttpsTrusts; -import org.maxkey.client.utils.JsonUtils; - -/** - * Represents an HTTP Request object - * - */ -public class Request -{ - private static Log _log = LogFactory.getLog(Request. class ); - public static final String DEFAULT_CONTENT_TYPE = "application/x-www-form-urlencoded"; - private static final String CONTENT_LENGTH = "Content-Length"; - private static final String CONTENT_TYPE = "Content-Type"; - private static RequestTuner NOOP = new RequestTuner() { - @Override public void tune(Request request){} - }; - - - private String url; - private HttpVerb verb; - private ParameterList querystringParams; - private ParameterList bodyParams; - private Map headers; - private String payload = null; - private HttpURLConnection connection; - private String charset; - private byte[] bytePayload = null; - private boolean connectionKeepAlive = false; - private boolean followRedirects = true; - private Long connectTimeout = null; - private Long readTimeout = null; - private String realm; - /** - * Creates a new Http Request - * - * @param verb Http Verb (GET, POST, etc) - * @param url url with optional querystring parameters. - */ - public Request(HttpVerb verb, String url) - { - this.verb = verb; - this.url = url; - this.querystringParams = new ParameterList(); - this.bodyParams = new ParameterList(); - this.headers = new HashMap(); - } - - /** - * Execute the request and return a {@link Response} - * - * @return Http Response - * @throws RuntimeException - * if the connection cannot be created. - */ - public Response send(RequestTuner tuner) - { - try - { - createConnection(); - return doSend(tuner); - } - catch (Exception e) - { - throw new OAuthConnectionException(e); - } - } - - public Response send() - { - return send(NOOP); - } - - private void createConnection() throws IOException - { - String completeUrl = getCompleteUrl(); - _log.debug("verb method : "+verb); - _log.debug("completeUrl : "+completeUrl); - - if (connection == null) - { - System.setProperty("http.keepAlive", connectionKeepAlive ? "true" : "false"); - connection = (HttpURLConnection) new URL(completeUrl).openConnection(); - if(completeUrl.trim().startsWith("https")){ - HttpsTrusts.beforeConnection(); - } - - connection.setInstanceFollowRedirects(followRedirects); - } - } - - /** - * Returns the complete url (host + resource + encoded querystring parameters). - * - * @return the complete url. - */ - public String getCompleteUrl() - { - return querystringParams.appendTo(url); - } - - Response doSend(RequestTuner tuner) throws IOException - { - connection.setRequestMethod(this.verb.name()); - if (connectTimeout != null) - { - connection.setConnectTimeout(connectTimeout.intValue()); - } - if (readTimeout != null) - { - connection.setReadTimeout(readTimeout.intValue()); - } - addHeaders(connection); - if (verb.equals(HttpVerb.PUT) || verb.equals(HttpVerb.POST)) - { - addBody(connection, getByteBodyContents()); - } - tuner.tune(this); - return new Response(connection); - } - - void addHeaders(HttpURLConnection conn) - { - for (String key : headers.keySet()) - conn.setRequestProperty(key, headers.get(key)); - } - - void addBody(HttpURLConnection conn, byte[] content) throws IOException - { - conn.setRequestProperty(CONTENT_LENGTH, String.valueOf(content.length)); - - // Set default content type if none is set. - if (conn.getRequestProperty(CONTENT_TYPE) == null) - { - conn.setRequestProperty(CONTENT_TYPE, DEFAULT_CONTENT_TYPE); - } - conn.setDoOutput(true); - conn.getOutputStream().write(content); - } - - /** - * Add an HTTP Header to the Request - * - * @param key the header name - * @param value the header value - */ - public void addHeader(String key, String value) - { - this.headers.put(key, value); - } - - /** - * Add a body Parameter (for POST/ PUT Requests) - * - * @param key the parameter name - * @param value the parameter value - */ - public void addBodyParameter(String key, String value) - { - this.bodyParams.add(key, value); - } - - /** - * Add a QueryString parameter - * - * @param key the parameter name - * @param value the parameter value - */ - public void addQuerystringParameter(String key, String value) - { - this.querystringParams.add(key, value); - } - - public void addParameter(String key, String value) { - if (hasBodyContent()) { - bodyParams.add(key, value); - } else { - querystringParams.add(key, value); - } - } - - protected boolean hasBodyContent() { - return verb == HttpVerb.PUT || verb == HttpVerb.POST; - } - /** - * Add body payload. - * - * This method is used when the HTTP body is not a form-url-encoded string, - * but another thing. Like for example XML. - * - * Note: The contents are not part of the OAuth signature - * - * @param payload the body of the request - */ - public void addPayload(String payload) - { - this.payload = payload; - } - - /** - * Overloaded version for byte arrays - * - * @param payload - */ - public void addPayload(byte[] payload) - { - this.bytePayload = payload.clone(); - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(String content) - { - this.payload = content; - } - - /** - * set REST Content - * - * @param content - */ - public void addRestObject(Object content) - { - try { - this.bytePayload = JsonUtils.gson2Json(content).getBytes("UTF-8"); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(byte[] content) - { - this.bytePayload = content.clone(); - } - - /** - * Get a {@link ParameterList} with the query string parameters. - * - * @return a {@link ParameterList} containing the query string parameters. - * @throws OAuthException if the request URL is not valid. - */ - public ParameterList getQueryStringParams() - { - try - { - ParameterList result = new ParameterList(); - String queryString = new URL(url).getQuery(); - result.addQuerystring(queryString); - result.addAll(querystringParams); - return result; - } - catch (MalformedURLException mue) - { - throw new OAuthException("Malformed URL", mue); - } - } - - /** - * Obtains a {@link ParameterList} of the body parameters. - * - * @return a {@link ParameterList}containing the body parameters. - */ - public ParameterList getBodyParams() - { - return bodyParams; - } - - /** - * Obtains the URL of the HTTP Request. - * - * @return the original URL of the HTTP Request - */ - public String getUrl() - { - return url; - } - - /** - * Returns the URL without the port and the query string part. - * - * @return the OAuth-sanitized URL - - public String getSanitizedUrl() - { - return url.replaceAll("\\?.*", "").replace("\\:\\d{4}", ""); - } - */ - /** - * Returns the URL without the port and the query string part. - * - * @return the OAuth-sanitized URL - */ - public String getSanitizedUrl() { - if (url.startsWith("http://") && (url.endsWith(":80") || url.contains(":80/"))) { - return url.replaceAll("\\?.*", "").replaceAll(":80", ""); - } else if (url.startsWith("https://") && (url.endsWith(":443") || url.contains(":443/"))) { - return url.replaceAll("\\?.*", "").replaceAll(":443", ""); - } else { - return url.replaceAll("\\?.*", ""); - } - } - /** - * Returns the body of the request - * - * @return form encoded string - * @throws OAuthException if the charset chosen is not supported - */ - public String getBodyContents() - { - try - { - return new String(getByteBodyContents(),getCharset()); - } - catch(UnsupportedEncodingException uee) - { - throw new OAuthException("Unsupported Charset: "+charset, uee); - } - } - - byte[] getByteBodyContents() - { - if (bytePayload != null) return bytePayload; - String body = (payload != null) ? payload : bodyParams.asFormUrlEncodedString(); - - _log.debug("getByteBodyContents : "+body); - try - { - return body.getBytes(getCharset()); - } - catch(UnsupportedEncodingException uee) - { - throw new OAuthException("Unsupported Charset: "+getCharset(), uee); - } - } - - - /** - * Returns the HTTP Verb - * - * @return the verb - */ - public HttpVerb getVerb() - { - return verb; - } - - public void setRealm(String realm) { - this.realm = realm; - } - - public String getRealm() { - return realm; - } - - /** - * Returns the connection headers as a {@link Map} - * - * @return map of headers - */ - public Map getHeaders() - { - return headers; - } - - /** - * Returns the connection charset. Defaults to {@link Charset} defaultCharset if not set - * - * @return charset - */ - public String getCharset() - { - return charset == null ? Charset.defaultCharset().name() : charset; - } - - /** - * Sets the connect timeout for the underlying {@link HttpURLConnection} - * - * @param duration duration of the timeout - * - * @param unit unit of time (milliseconds, seconds, etc) - */ - public void setConnectTimeout(int duration, TimeUnit unit) - { - this.connectTimeout = unit.toMillis(duration); - } - - /** - * Sets the read timeout for the underlying {@link HttpURLConnection} - * - * @param duration duration of the timeout - * - * @param unit unit of time (milliseconds, seconds, etc) - */ - public void setReadTimeout(int duration, TimeUnit unit) - { - this.readTimeout = unit.toMillis(duration); - } - - /** - * Set the charset of the body of the request - * - * @param charsetName name of the charset of the request - */ - public void setCharset(String charsetName) - { - this.charset = charsetName; - } - - /** - * Sets whether the underlying Http Connection is persistent or not. - * - * @see http://download.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html - * @param connectionKeepAlive - */ - - @Deprecated - public void setConnectionKeepAlive(boolean connectionKeepAlive){ - this.connectionKeepAlive = connectionKeepAlive; - } - - /** - * - * @param connectionKeepAlive - * true or false - */ - public void setConnectionKeepAlive(String connectionKeepAlive){ - System.setProperty("http.keepAlive", connectionKeepAlive); - } - - /** - * Sets whether the underlying Http Connection follows redirects or not. - * - * Defaults to true (follow redirects) - * - * @see http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#setInstanceFollowRedirects(boolean) - * @param followRedirects - */ - public void setFollowRedirects(boolean followRedirects) - { - this.followRedirects = followRedirects; - } - - /* - * We need this in order to stub the connection object for test cases - */ - void setConnection(HttpURLConnection connection) - { - this.connection = connection; - } - - @Override - public String toString() - { - return String.format("@Request(%s %s)", getVerb(), getUrl()); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RequestTuner.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RequestTuner.java deleted file mode 100644 index a95e3b884..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RequestTuner.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -public abstract class RequestTuner -{ - public abstract void tune(Request request); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Response.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Response.java deleted file mode 100644 index e43de9311..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/Response.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import java.io.*; -import java.net.*; -import java.util.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.utils.StreamUtils; - -/** - * Represents an HTTP Response. - * - * @author Pablo Fernandez - */ -public class Response { - - private int code; - private String message; - private String body; - private InputStream stream; - private Map headers; - - public Response(int code, String message, Map headers, String body, InputStream stream) { - this.code = code; - this.headers = headers; - this.body = body; - this.message = message; - this.stream = stream; - } - - Response(HttpURLConnection connection) throws IOException { - try { - connection.connect(); - code = connection.getResponseCode(); - message = connection.getResponseMessage(); - headers = parseHeaders(connection); - stream = isSuccessful() ? connection.getInputStream() : connection.getErrorStream(); - } catch (UnknownHostException e) { - throw new OAuthException("The IP address of a host could not be determined.", e); - } - } - - private String parseBodyContents() throws IOException { - if ("gzip".equals(getHeader("Content-Encoding"))) { - body = StreamUtils.getGzipStreamContents(getStream()); - } else { - body = StreamUtils.getStreamContents(getStream()); - } - return body; - } - - private Map parseHeaders(HttpURLConnection conn) { - final Map headers = new HashMap<>(); - for (String key : conn.getHeaderFields().keySet()) { - headers.put(key, conn.getHeaderFields().get(key).get(0)); - } - return headers; - } - - public final boolean isSuccessful() { - return getCode() >= 200 && getCode() < 400; - } - - public String getBody() { - try { - return body == null ? parseBodyContents() : body; - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return ""; - } - - /** - * Obtains the meaningful stream of the HttpUrlConnection, either inputStream or errorInputStream, depending on the - * status code - * - * @return input stream / error stream - */ - public InputStream getStream() { - return stream; - } - - /** - * Obtains the HTTP status code - * - * @return the status code - */ - public final int getCode() { - return code; - } - - /** - * Obtains the HTTP status message. Returns null if the message can not be discerned from the response - * (not valid HTTP) - * - * @return the status message - */ - public String getMessage() { - return message; - } - - /** - * Obtains a {@link Map} containing the HTTP Response Headers - * - * @return headers - */ - public Map getHeaders() { - return headers; - } - - /** - * Obtains a single HTTP Header value, or null if undefined - * - * @param name the header name. - * - * @return header value or null. - */ - public String getHeader(String name) { - return headers.get(name); - } - - @Override - public String toString() { - return "Response{" + - "code=" + code + - ", message='" + message + '\'' + - ", body='" + body + '\'' + - ", headers=" + headers + - '}'; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RestClient.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RestClient.java deleted file mode 100644 index 1fdc638f0..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/RestClient.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.maxkey.client.http.AuthorizationHeader; -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Response; -import org.maxkey.client.utils.Preconditions; - - -public class RestClient { - - private static Log _log = LogFactory.getLog(RestClient. class ); - - //action method - private HttpVerb method = HttpVerb.GET; - - //request Service - private Request request; - - - public RestClient(String url) { - Preconditions.checkEmptyString(url, "Invalid request url"); - - request = new Request(method, url); - } - - - /** - * 鏋勯�犳柟娉� - * - * @param method 璇锋眰鏂规硶 - * @param url 璇锋眰url - */ - public RestClient(String url,HttpVerb method) { - Preconditions.checkEmptyString(url, "Invalid request url"); - if(method != null) { - this.method = method; - } - request = new Request(method, url); - } - - - /** - * 娣诲姞璇锋眰鍙傛暟 - * - * @param name 鍙傛暟鍚� - * @param value 鍙傛暟鍊� - */ - public void addParameter(String name,String value) { - Preconditions.checkEmptyString(name, "parameter name is null"); - Preconditions.checkNotNull(request, "RestClient is null"); - if(HttpVerb.GET == method) { - request.addQuerystringParameter(name, value); - } else if(HttpVerb.POST == method) { - request.addBodyParameter(name, value); - } - } - - /** - * 娣诲姞璇锋眰Header - * - * @param name 鍙傛暟鍚� - * @param value 鍙傛暟鍊� - */ - public void addHeader(String name,String value) { - Preconditions.checkEmptyString(name, "parameter name is null"); - Preconditions.checkNotNull(request, "OAuthRequest is null"); - request.addHeader(name, value); - } - - /** - * 鍙戦�佽姹傦紝鑾峰彇杩斿洖鐨勬暟鎹� - * - * @return Response 鏈嶅姟绔繑鍥炵殑鏁版嵁 - */ - public Response execute() { - return request.send(); - } - - - public void addBasicAuthorization(String username,String password) { - Preconditions.checkEmptyString(username, "parameter username is null"); - Preconditions.checkEmptyString(password, "parameter password is null"); - Preconditions.checkNotNull(request, "RestClient is null"); - request.addHeader(AuthorizationHeader.AUTHORIZATION_HEADERNAME, AuthorizationHeader.createBasic(username, password)); - } - - public void addBearerAuthorization(String bearer) { - Preconditions.checkEmptyString(bearer, "parameter bearer is null"); - Preconditions.checkNotNull(request, "RestClient is null"); - request.addHeader(AuthorizationHeader.AUTHORIZATION_HEADERNAME, AuthorizationHeader.createBearer(bearer)); - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(String content) - { - this.request.addRestContent(content) ; - } - - /** - * set REST Content - * - * @param content - */ - public void addRestObject(Object content) - { - this.request.addRestObject(content); - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(byte[] content) - { - this.request.addRestContent(content); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/SignatureType.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/SignatureType.java deleted file mode 100644 index d3ee2d076..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/SignatureType.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.http; - -public enum SignatureType -{ - Header, - QueryString -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/package-info.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/http/package-info.java deleted file mode 100644 index 5a7bb9b15..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/http/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -/** - * @author Administrator - * - */ -package org.maxkey.client.http; diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/ltpa/LtpaUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/ltpa/LtpaUtils.java deleted file mode 100644 index 29de0a78d..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/ltpa/LtpaUtils.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.ltpa; - -import java.io.UnsupportedEncodingException; -import java.util.HashMap; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; - -import org.apache.commons.codec.DecoderException; -import org.apache.commons.codec.binary.Hex; -import org.maxkey.client.crypto.Base64Utils; -import org.maxkey.client.crypto.ReciprocalUtils; -import org.maxkey.client.utils.JsonUtils; - -public class LtpaUtils { - - public static String readLtpa(HttpServletRequest request,String ltpaDomain,String ltpaName){ - Cookie[] cookies = request.getCookies(); - if(cookies!=null) { - for (int i = 0; i < cookies.length; i++) { - if(cookies[i].getName().equalsIgnoreCase(ltpaName)){ - return cookies[i].getValue(); - } - } - } - return null; - } - - public static String decode(String ltpaString,String algorithmKey, String algorithm){ - - String token=ReciprocalUtils.decoder(Base64Utils.base64UrlDecode(ltpaString), algorithmKey, algorithm); - - try { - token=new String(Hex.decodeHex(token.toCharArray()),"UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (DecoderException e) { - e.printStackTrace(); - } - - return token; - } - - - @SuppressWarnings("unchecked") - public static HashMap parseLtpaJson(String token){ - HashMap tokenMap=new HashMap(); - - tokenMap=JsonUtils.gson2Object(token, tokenMap.getClass()); - - return tokenMap; - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - String token="ICHQ%2F1Tdzw214UNw9fKEjRNFbvOlGdXyxVjF9I7kwEo%3D"; - String tokenString=LtpaUtils.decode(token, "x8zPbCya", ReciprocalUtils.Algorithm.DES); - System.out.println(tokenString); - - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/OAuthClient.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/OAuthClient.java deleted file mode 100644 index 775cfd64f..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/OAuthClient.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.maxkey.client.http.AuthorizationHeader; -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Response; -import org.maxkey.client.oauth.domain.OIDCUserInfo; -import org.maxkey.client.oauth.domain.UserInfo; -import org.maxkey.client.oauth.model.OAuthConstants; -import org.maxkey.client.oauth.model.OAuthRequest; -import org.maxkey.client.oauth.model.Token; -import org.maxkey.client.utils.JsonUtils; -import org.maxkey.client.utils.Preconditions; - - -public class OAuthClient { - - private static Log log = LogFactory.getLog(OAuthClient. class ); - private static final String DEFAULT_WEB_URL = "http://sso.maxkey.org/maxkey"; - - public static String OAUTH_V20_USERINFO_URI=DEFAULT_WEB_URL+"/api/oauth/v20/me"; - - public static String OAUTH_V10A_USERINFO_URI=DEFAULT_WEB_URL+"/api/oauth/v10a/me"; - - public static String OPENID_CONNECT_V10A_USERINFO_URI=DEFAULT_WEB_URL+"/api/connect/v10/userinfo"; - - //action method - private HttpVerb method = HttpVerb.GET; - //request Service - private OAuthRequest request; - - - public OAuthClient(String url) { - Preconditions.checkEmptyString(url, "Invalid request url"); - - request = new OAuthRequest(method, url); - } - - public OAuthClient(String url,String accessToken) { - - Preconditions.checkEmptyString(url, "Invalid request url"); - - request = new OAuthRequest(method, url); - - addParameter(OAuthConstants.ACCESS_TOKEN, accessToken); - } - - - /** - * 鏋勯�犳柟娉� - * - * @param method 璇锋眰鏂规硶 - * @param url 璇锋眰url - */ - public OAuthClient(String url,HttpVerb method) { - Preconditions.checkEmptyString(url, "Invalid request url"); - if(method != null) { - this.method = method; - } - request = new OAuthRequest(method, url); - } - - /** - * 灏哸ccess token闄勫姞鍒拌姹傚弬鏁颁腑 - * - * @param accessToken - */ - public void signAccessToken(Token accessToken) { - Preconditions.checkNotNull(request, "OAuthRequest is null"); - addParameter(OAuthConstants.ACCESS_TOKEN, accessToken.getToken()); - } - - /** - * 娣诲姞璇锋眰鍙傛暟 - * - * @param name 鍙傛暟鍚� - * @param value 鍙傛暟鍊� - */ - public void addParameter(String name,String value) { - Preconditions.checkEmptyString(name, "parameter name is null"); - Preconditions.checkNotNull(request, "OAuthRequest is null"); - if(HttpVerb.GET == method) { - request.addQuerystringParameter(name, value); - } else if(HttpVerb.POST == method) { - request.addBodyParameter(name, value); - } - } - - /** - * 娣诲姞璇锋眰Header - * - * @param name 鍙傛暟鍚� - * @param value 鍙傛暟鍊� - */ - public void addHeader(String name,String value) { - Preconditions.checkEmptyString(name, "parameter name is null"); - Preconditions.checkNotNull(request, "OAuthRequest is null"); - request.addHeader(name, value); - } - - /** - * 鍙戦�佽姹傦紝鑾峰彇杩斿洖鐨勬暟鎹� - * - * @return Response 鏈嶅姟绔繑鍥炵殑鏁版嵁 - */ - public Response execute() { - return request.send(); - } - - public Token requestAccessToken(){ - String tokenString=execute().getBody(); - Token token =JsonUtils.gson2Object(tokenString, Token.class); - log.debug("Request token : "+token); - return token; - } - - public void addBasicAuthorization(String username,String password) { - Preconditions.checkEmptyString(username, "parameter username is null"); - Preconditions.checkEmptyString(password, "parameter password is null"); - Preconditions.checkNotNull(request, "OAuthRequest is null"); - request.addHeader(AuthorizationHeader.AUTHORIZATION_HEADERNAME, AuthorizationHeader.createBasic(username, password)); - } - - public void addBearerAuthorization(String bearer) { - Preconditions.checkEmptyString(bearer, "parameter bearer is null"); - Preconditions.checkNotNull(request, "OAuthRequest is null"); - request.addHeader(AuthorizationHeader.AUTHORIZATION_HEADERNAME, AuthorizationHeader.createBearer(bearer)); - } - - public UserInfo getUserInfo(String accessToken){ - - addParameter(OAuthConstants.ACCESS_TOKEN, accessToken); - - Response response = execute(); - - log.debug("Request UserInfo : "+response.getBody()); - - UserInfo userInfo = (UserInfo) JsonUtils.gson2Object(response.getBody(), UserInfo.class); - - userInfo.setResponseString(response.getBody()); - - if(userInfo.getError() != null && !"".equals(userInfo.getError().trim())) { - } - - log.debug("UserInfo : "+userInfo); - return userInfo; - } - - public OIDCUserInfo getOIDCUserInfo(String accessToken){ - - addHeader("Authorization", accessToken); - - Response response = execute(); - - log.debug("Request OIDCUserInfo : "+response.getBody()); - - OIDCUserInfo userInfo = (OIDCUserInfo) JsonUtils.gson2Object(response.getBody(), OIDCUserInfo.class); - - userInfo.setResponseString(response.getBody()); - - if(userInfo.getError() != null && !"".equals(userInfo.getError().trim())) { - } - - log.debug("UserInfo : "+userInfo); - return userInfo; - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(String content) - { - this.request.addRestContent(content) ; - } - - /** - * set REST Content - * - * @param content - */ - public void addRestObject(Object content) - { - this.request.addRestObject(content); - } - - /** - * set REST Content - * - * @param content - */ - public void addRestContent(byte[] content) - { - this.request.addRestContent(content); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/ServiceBuilder.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/ServiceBuilder.java deleted file mode 100644 index 66f2d73fd..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/ServiceBuilder.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder; - -import java.io.*; - -import org.maxkey.client.http.SignatureType; -import org.maxkey.client.oauth.builder.api.*; -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.oauth.oauth.*; -import org.maxkey.client.utils.Preconditions; - -/** - * Implementation of the Builder pattern, with a fluent interface that creates a - * {@link OAuthService} - * - * @author Pablo Fernandez - * - */ -public class ServiceBuilder -{ - private String apiKey; - private String apiSecret; - private String callback; - private Api api; - private String scope; - private SignatureType signatureType; - private OutputStream debugStream; - - /** - * Default constructor - */ - public ServiceBuilder() - { - this.callback = OAuthConstants.OUT_OF_BAND; - this.signatureType = SignatureType.Header; - this.debugStream = null; - } - - /** - * Configures the {@link Api} - * - * @param apiClass the class of one of the existent {@link Api}s on org.scribe.api package - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder provider(Class apiClass) - { - this.api = createApi(apiClass); - return this; - } - - private Api createApi(Class apiClass) - { - Preconditions.checkNotNull(apiClass, "Api class cannot be null"); - Api api; - try - { - api = apiClass.newInstance(); - } - catch(Exception e) - { - throw new OAuthException("Error while creating the Api object", e); - } - return api; - } - - /** - * Configures the {@link Api} - * - * Overloaded version. Let's you use an instance instead of a class. - * - * @param api instance of {@link Api}s - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder provider(Api api) - { - Preconditions.checkNotNull(api, "Api cannot be null"); - this.api = api; - return this; - } - - /** - * Adds an OAuth callback url - * - * @param callback callback url. Must be a valid url or 'oob' for out of band OAuth - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder callback(String callback) - { - Preconditions.checkNotNull(callback, "Callback can't be null"); - this.callback = callback; - return this; - } - - /** - * Configures the api key - * - * @param apiKey The api key for your application - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder apiKey(String apiKey) - { - Preconditions.checkEmptyString(apiKey, "Invalid Api key"); - this.apiKey = apiKey; - return this; - } - - /** - * Configures the api secret - * - * @param apiSecret The api secret for your application - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder apiSecret(String apiSecret) - { - Preconditions.checkEmptyString(apiSecret, "Invalid Api secret"); - this.apiSecret = apiSecret; - return this; - } - - /** - * Configures the OAuth scope. This is only necessary in some APIs (like Google's). - * - * @param scope The OAuth scope - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder scope(String scope) - { - Preconditions.checkEmptyString(scope, "Invalid OAuth scope"); - this.scope = scope; - return this; - } - - /** - * Configures the signature type, choose between header, querystring, etc. Defaults to Header - * - * @param scope The OAuth scope - * @return the {@link ServiceBuilder} instance for method chaining - */ - public ServiceBuilder signatureType(SignatureType type) - { - Preconditions.checkNotNull(type, "Signature type can't be null"); - this.signatureType = type; - return this; - } - - public ServiceBuilder debugStream(OutputStream stream) - { - Preconditions.checkNotNull(stream, "debug stream can't be null"); - this.debugStream = stream; - return this; - } - - public ServiceBuilder debug() - { - this.debugStream(System.out); - return this; - } - - /** - * Returns the fully configured {@link OAuthService} - * - * @return fully configured {@link OAuthService} - */ - public OAuthService build() - { - Preconditions.checkNotNull(api, "You must specify a valid api through the provider() method"); - Preconditions.checkEmptyString(apiKey, "You must provide an api key"); - Preconditions.checkEmptyString(apiSecret, "You must provide an api secret"); - return api.createService(new OAuthConfig(apiKey, apiSecret, callback, signatureType, scope, debugStream)); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/Api.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/Api.java deleted file mode 100644 index a2284f87e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/Api.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder.api; - - -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.oauth.oauth.*; - -/** - * Contains all the configuration needed to instantiate a valid {@link OAuthService} - * - * @author Pablo Fernandez - * - */ -public interface Api -{ - /** - * Creates an {@link OAuthService} - * - * @param apiKey your application api key - * @param apiSecret your application api secret - * @param callback the callback url (or 'oob' for out of band OAuth) - * @param scope the OAuth scope - * - * @return fully configured {@link OAuthService} - */ - OAuthService createService(OAuthConfig config); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/DefaultApi20.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/DefaultApi20.java deleted file mode 100644 index fb5e4209c..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/DefaultApi20.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder.api; - - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.oauth.extractors.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.oauth.oauth.*; - -/** - * Default implementation of the OAuth protocol, version 2.0 (draft 11) - * - * This class is meant to be extended by concrete implementations of the API, - * providing the endpoints and endpoint-http-verbs. - * - * If your Api adheres to the 2.0 (draft 11) protocol correctly, you just need to extend - * this class and define the getters for your endpoints. - * - * If your Api does something a bit different, you can override the different - * extractors or services, in order to fine-tune the process. Please read the - * javadocs of the interfaces to get an idea of what to do. - * - * @author Diego Silveira - * - */ -public abstract class DefaultApi20 implements Api -{ - - /** - * Returns the access token extractor. - * - * @return access token extractor - */ - public AccessTokenExtractor getAccessTokenExtractor() - { - return new TokenExtractor20Impl(); - } - - /** - * Returns the verb for the access token endpoint (defaults to GET) - * - * @return access token endpoint verb - */ - public HttpVerb getAccessTokenVerb() - { - return HttpVerb.GET; - } - - /** - * Returns the URL that receives the access token requests. - * - * @return access token URL - */ - public abstract String getAccessTokenEndpoint(); - - - public abstract String getGrantType() ; - /** - * Returns the URL where you should redirect your users to authenticate - * your application. - * - * @param config OAuth 2.0 configuration param object - * @return the URL where you should redirect your users - */ - public abstract String getAuthorizationUrl(OAuthConfig config); - - /** - * {@inheritDoc} - */ - public OAuthService createService(OAuthConfig config) - { - return new OAuth20ServiceImpl(this, config); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyApi20.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyApi20.java deleted file mode 100644 index 7795a1f0b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyApi20.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder.api; - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.oauth.extractors.AccessTokenExtractor; -import org.maxkey.client.oauth.extractors.GsonJsonTokenExtractor; -import org.maxkey.client.oauth.model.OAuthConfig; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -public class MaxkeyApi20 extends DefaultApi20 { - //approval_prompt:force or auto - private static final String DEFAULT_WEB_URL = "https://sso.maxkey.top/maxkey"; - - private static final String AUTHORIZATION_URL = "%s/oauth/v20/authorize?client_id=%s&response_type=code&redirect_uri=%s&approval_prompt=auto"; - - private static final String SCOPED_AUTHORIZE_URL = String.format("%s&scope=%%s", AUTHORIZATION_URL); - - public MaxkeyApi20() { - - } - - - @Override - public String getAccessTokenEndpoint() { - return getWebUrl() + "/oauth/v20/token?grant_type=authorization_code"; - } - - - @Override - public String getAuthorizationUrl(OAuthConfig config) { - Preconditions.checkValidUrl(config.getCallback(), "Must provide a valid url as callback. Secure does not support OOB"); - if(config.hasScope()) { - return String.format(SCOPED_AUTHORIZE_URL, getWebUrl(),config.getApiKey(), HttpEncoder.encode(config.getCallback()), HttpEncoder.encode(config.getScope())); - } else { - return String.format(AUTHORIZATION_URL, getWebUrl(),config.getApiKey(), HttpEncoder.encode(config.getCallback())); - } - } - - - - @Override - public HttpVerb getAccessTokenVerb() { - return HttpVerb.POST; - } - - - @Override - public AccessTokenExtractor getAccessTokenExtractor() { - return new GsonJsonTokenExtractor(); - } - - private String getWebUrl() { - String webUrl = null; - if(webUrl == null || "".equals(webUrl)) { - webUrl = DEFAULT_WEB_URL; - } - return webUrl; - } - - - @Override - public String getGrantType() { - // TODO Auto-generated method stub - return "authorization_code"; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyPasswordApi20.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyPasswordApi20.java deleted file mode 100644 index 1507e6d5e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/MaxkeyPasswordApi20.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder.api; - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.oauth.extractors.AccessTokenExtractor; -import org.maxkey.client.oauth.extractors.GsonJsonTokenExtractor; -import org.maxkey.client.oauth.model.OAuthConfig; - - - -/** - * OAuth 2.0 api. - */ -public class MaxkeyPasswordApi20 extends DefaultApi20 { - - private String accessTokenUrl; - private String grantType = "password"; - private String scope = "&scope=%s"; - private String accessTokenMethod = "POST"; - - private static final String AUTHORIZE_PARAM = "&client_id=%s&client_secret=%s&username=%s&password=%s"; - - public MaxkeyPasswordApi20(String accessTokenUrl) { - super(); - this.accessTokenUrl = accessTokenUrl; - } - - @Override - public HttpVerb getAccessTokenVerb() { - if (accessTokenMethod != null - && accessTokenMethod.toUpperCase().equals("POST")) { - return HttpVerb.POST; - } else { - return HttpVerb.GET; - } - } - - @Override - public AccessTokenExtractor getAccessTokenExtractor() { - return new GsonJsonTokenExtractor(); - } - - @Override - public String getAccessTokenEndpoint() { - if (accessTokenUrl.indexOf("?") > 0) { - return accessTokenUrl + "&grant_type=" + grantType+ AUTHORIZE_PARAM; - } else { - return accessTokenUrl + "?grant_type=" + grantType+ AUTHORIZE_PARAM; - } - } - - public String getAuthorizationUrl(OAuthConfig config,String username,String password) { - return String.format(getAccessTokenEndpoint(), - config.getApiKey(), - config.getApiSecret(), - username, - password); - } - - public String getAccessTokenUrl() { - return accessTokenUrl; - } - - public void setAccessTokenUrl(String accessTokenUrl) { - this.accessTokenUrl = accessTokenUrl; - } - - @Override - public String toString() { - return "OAuthApi20 [accessTokenUrl=" + accessTokenUrl + ", grantType=" - + grantType + ", scope=" + scope + "]"; - } - - @Override - public String getAuthorizationUrl(OAuthConfig config) { - return ""; - } - - @Override - public String getGrantType() { - // TODO Auto-generated method stub - return "authorization_code"; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/OAuthApi20.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/OAuthApi20.java deleted file mode 100644 index 3a0a81509..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/builder/api/OAuthApi20.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.builder.api; - - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.oauth.extractors.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.HttpEncoder; - -/** - * OAuth 2.0 api. - */ -public class OAuthApi20 extends DefaultApi20 -{ - //private static final String AUTHORIZE_URL = "https://api.weibo.com/oauth2/authorize?client_id=%s&redirect_uri=%s&response_type=code"; - //private static final String SCOPED_AUTHORIZE_URL = AUTHORIZE_URL + "&scope=%s"; - private String authorizeUrl; - private String accessTokenUrl; - private String grantType="authorization_code"; - private String scope="&scope=%s"; - private String accessTokenMethod="POST"; - - - public OAuthApi20(String authorizeUrl, String accessTokenUrl) { - super(); - this.authorizeUrl = authorizeUrl; - this.accessTokenUrl = accessTokenUrl; - } - - public OAuthApi20(String authorizeUrl, String accessTokenUrl,String accessTokenMethod) { - super(); - this.authorizeUrl = authorizeUrl; - this.accessTokenUrl = accessTokenUrl; - this.accessTokenMethod=accessTokenMethod; - } - - public OAuthApi20(String authorizeUrl, String accessTokenUrl,String grantType,String accessTokenMethod) { - super(); - this.authorizeUrl = authorizeUrl; - this.accessTokenUrl = accessTokenUrl; - this.grantType = grantType; - this.accessTokenMethod=accessTokenMethod; - } - - - public OAuthApi20(String authorizeUrl, String accessTokenUrl,String grantType, String accessTokenMethod,String scope) { - super(); - this.authorizeUrl = authorizeUrl; - this.accessTokenUrl = accessTokenUrl; - this.grantType = grantType; - this.accessTokenMethod=accessTokenMethod; - this.scope = scope; - } - - - @Override - public HttpVerb getAccessTokenVerb(){ - if(accessTokenMethod!= null &&accessTokenMethod.toUpperCase().equals("POST")){ - return HttpVerb.POST; - }else{ - return HttpVerb.GET; - } - } - - @Override - public AccessTokenExtractor getAccessTokenExtractor(){ - if(accessTokenUrl.indexOf("qq")>-1){ - return new QQTokenExtractor(); - } - return new GsonJsonTokenExtractor(); - } - - @Override - public String getAccessTokenEndpoint(){ - if(accessTokenUrl.indexOf("?")>0){ - return accessTokenUrl+"&grant_type="+grantType; - }else{ - return accessTokenUrl+"?grant_type="+grantType; - } - } - - @Override - public String getAuthorizationUrl(OAuthConfig config){ - // Append scope if present - //dingtalk - if(authorizeUrl.indexOf("oapi.dingtalk.com")>-1) { - if (config.hasScope()){ - return String.format(authorizeUrl+scope, config.getApiKey(), config.getCallback(), HttpEncoder.encode(config.getScope())); - } - else{ - return String.format(authorizeUrl, config.getApiKey(), config.getCallback()); - } - }else { - if (config.hasScope()){ - return String.format(authorizeUrl+scope, config.getApiKey(), HttpEncoder.encode(config.getCallback()), HttpEncoder.encode(config.getScope())); - } - else{ - return String.format(authorizeUrl, config.getApiKey(), HttpEncoder.encode(config.getCallback())); - } - } - } - - public String getAuthorizeUrl() { - return authorizeUrl; - } - - public void setAuthorizeUrl(String authorizeUrl) { - this.authorizeUrl = authorizeUrl; - } - - public String getAccessTokenUrl() { - return accessTokenUrl; - } - - public void setAccessTokenUrl(String accessTokenUrl) { - this.accessTokenUrl = accessTokenUrl; - } - - public String getGrantType() { - return grantType; - } - - public void setGrantType(String grantType) { - this.grantType = grantType; - } - - - @Override - public String toString() { - return "OAuthApi20 [authorizeUrl=" + authorizeUrl + ", accessTokenUrl=" - + accessTokenUrl + ", grantType=" + grantType + ", scope=" - + scope + "]"; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseDomain.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseDomain.java deleted file mode 100644 index 01aa6f168..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseDomain.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.domain; - -import java.io.Serializable; -import java.util.Date; -import java.util.UUID; - -import org.apache.log4j.Logger; - -/** - * BaseDomain for connsec's domain - * - * @author Crystal.sea - * - */ -public class BaseDomain implements Serializable{ - /** - * - */ - private static final long serialVersionUID = -6290127045507211154L; - - - protected final static Logger logger = Logger.getLogger(BaseDomain.class); - - /** - * Domain id - */ - protected String id; - - - - protected String tid; - - protected String tname; - /** - * description - */ - protected String description; - - protected int status; - - protected int sortOrder; - - protected String createdBy; - - protected Date createdDate; - - protected String modifiedBy; - - protected Date modifiedDate; - - - protected String startDate; - protected String endDate; - - protected String error; - protected String error_description; - - protected String responseString; - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } - - public String getError_description() { - return error_description; - } - - public void setError_description(String error_description) { - this.error_description = error_description; - } - - public BaseDomain() { - - } - - /** - * @return the id - */ - public String getId() { - return id; - } - - - - - /** - * @param id the id to set - */ - public void setId(String id) { - this.id = id; - } - - - - - - /** - * @return the status - */ - public int getStatus() { - return status; - } - - - - - /** - * @param status the status to set - */ - public void setStatus(int status) { - this.status = status; - } - - - - /** - * @return the tid - */ - public String getTid() { - return tid; - } - - /** - * @param tid the tid to set - */ - public void setTid(String tid) { - this.tid = tid; - } - - /** - * @return the tname - */ - public String getTname() { - return tname; - } - - /** - * @param tname the tname to set - */ - public void setTname(String tname) { - this.tname = tname; - } - - /** - * @return the sortOrder - */ - public int getSortOrder() { - return sortOrder; - } - - - - - /** - * @param sortOrder the sortOrder to set - */ - public void setSortOrder(int sortOrder) { - this.sortOrder = sortOrder; - } - - - - - /** - * @return the createdBy - */ - public String getCreatedBy() { - return createdBy; - } - - - - - /** - * @param createdBy the createdBy to set - */ - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - - - - /** - * @return the createdDate - */ - public Date getCreatedDate() { - return createdDate; - } - - - - - /** - * @param createdDate the createdDate to set - */ - public void setCreatedDate(Date createdDate) { - this.createdDate = createdDate; - } - - - - - /** - * @return the modifiedBy - */ - public String getModifiedBy() { - return modifiedBy; - } - - - - - /** - * @param modifiedBy the modifiedBy to set - */ - public void setModifiedBy(String modifiedBy) { - this.modifiedBy = modifiedBy; - } - - - - - /** - * @return the modifiedDate - */ - public Date getModifiedDate() { - return modifiedDate; - } - - - - - /** - * @param modifiedDate the modifiedDate to set - */ - public void setModifiedDate(Date modifiedDate) { - this.modifiedDate = modifiedDate; - } - - - - - /** - * @return the description - */ - public String getDescription() { - return description; - } - - - - - /** - * @param description the description to set - */ - public void setDescription(String description) { - this.description = description; - } - - - - - /** - * @return the startDate - */ - public String getStartDate() { - return startDate; - } - - - - - /** - * @param startDate the startDate to set - */ - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - - - - /** - * @return the endDate - */ - public String getEndDate() { - return endDate; - } - - /** - * @param endDate the endDate to set - */ - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - public void genId() { - this.id=UUID.randomUUID().toString().toLowerCase(); - } - - public String getResponseString() { - return responseString; - } - - public void setResponseString(String responseString) { - this.responseString = responseString; - } - - @Override - public String toString() { - return "BaseDomain [id=" + id + ", tid=" + tid + ", tname=" + tname - + ", status=" + status + ", sortOrder=" + sortOrder - + ", createdBy=" + createdBy + ", createdDate=" + createdDate - + ", modifiedBy=" + modifiedBy + ", modifiedDate=" - + modifiedDate + ", description=" + description - + ", startDate=" + startDate + ", endDate=" + endDate + "]"; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseEntity.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseEntity.java deleted file mode 100644 index 63ec3433a..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/BaseEntity.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.domain; - -public class BaseEntity { - - private String error; - private String error_description; - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } - - public String getError_description() { - return error_description; - } - - public void setError_description(String error_description) { - this.error_description = error_description; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCAddress.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCAddress.java deleted file mode 100644 index 0cc99f48d..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCAddress.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.domain; - -public class OIDCAddress { - - public String country; - public String region; - public String locality; - public String street_address; - public String formatted; - public String postal_code; - /** - * - */ - public OIDCAddress() { - // TODO Auto-generated constructor stub - } - public String getCountry() { - return country; - } - public void setCountry(String country) { - this.country = country; - } - public String getRegion() { - return region; - } - public void setRegion(String region) { - this.region = region; - } - public String getLocality() { - return locality; - } - public void setLocality(String locality) { - this.locality = locality; - } - public String getStreet_address() { - return street_address; - } - public void setStreet_address(String street_address) { - this.street_address = street_address; - } - public String getFormatted() { - return formatted; - } - public void setFormatted(String formatted) { - this.formatted = formatted; - } - public String getPostal_code() { - return postal_code; - } - public void setPostal_code(String postal_code) { - this.postal_code = postal_code; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCUserInfo.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCUserInfo.java deleted file mode 100644 index 965e44d6a..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/OIDCUserInfo.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -package org.maxkey.client.oauth.domain; - -/** - * @author Administrator - * - */ -public class OIDCUserInfo { - - private String sub; - private String name; - private String preferred_username; - private String given_name; - private String family_name; - private String middle_name; - private String nickname; - private String profile; - private String picture; - private String website; - private String gender; - private String zoneinfo; - private String locale; - private String updated_time; - private String birthdate; - - - private String email; - private boolean email_verified; - - private String phone_number; - private boolean phone_number_verified; - private OIDCAddress address; - - - protected String error; - protected String error_description; - - protected String responseString; - - - /** - * - */ - public OIDCUserInfo() { - // TODO Auto-generated constructor stub - } - - public String getSub() { - return sub; - } - - public void setSub(String sub) { - this.sub = sub; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPreferred_username() { - return preferred_username; - } - - public void setPreferred_username(String preferred_username) { - this.preferred_username = preferred_username; - } - - public String getGiven_name() { - return given_name; - } - - public void setGiven_name(String given_name) { - this.given_name = given_name; - } - - public String getFamily_name() { - return family_name; - } - - public void setFamily_name(String family_name) { - this.family_name = family_name; - } - - public String getMiddle_name() { - return middle_name; - } - - public void setMiddle_name(String middle_name) { - this.middle_name = middle_name; - } - - public String getNickname() { - return nickname; - } - - public void setNickname(String nickname) { - this.nickname = nickname; - } - - public String getProfile() { - return profile; - } - - public void setProfile(String profile) { - this.profile = profile; - } - - public String getPicture() { - return picture; - } - - public void setPicture(String picture) { - this.picture = picture; - } - - public String getWebsite() { - return website; - } - - public void setWebsite(String website) { - this.website = website; - } - - public String getGender() { - return gender; - } - - public void setGender(String gender) { - this.gender = gender; - } - - public String getZoneinfo() { - return zoneinfo; - } - - public void setZoneinfo(String zoneinfo) { - this.zoneinfo = zoneinfo; - } - - public String getLocale() { - return locale; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - public String getUpdated_time() { - return updated_time; - } - - public void setUpdated_time(String updated_time) { - this.updated_time = updated_time; - } - - public String getBirthdate() { - return birthdate; - } - - public void setBirthdate(String birthdate) { - this.birthdate = birthdate; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public boolean isEmail_verified() { - return email_verified; - } - - public void setEmail_verified(boolean email_verified) { - this.email_verified = email_verified; - } - - public String getPhone_number() { - return phone_number; - } - - public void setPhone_number(String phone_number) { - this.phone_number = phone_number; - } - - public boolean isPhone_number_verified() { - return phone_number_verified; - } - - public void setPhone_number_verified(boolean phone_number_verified) { - this.phone_number_verified = phone_number_verified; - } - - public OIDCAddress getAddress() { - return address; - } - - public void setAddress(OIDCAddress address) { - this.address = address; - } - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } - - public String getError_description() { - return error_description; - } - - public void setError_description(String error_description) { - this.error_description = error_description; - } - - public String getResponseString() { - return responseString; - } - - public void setResponseString(String responseString) { - this.responseString = responseString; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/UserInfo.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/UserInfo.java deleted file mode 100644 index 0a60c9d6e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/domain/UserInfo.java +++ /dev/null @@ -1,792 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.domain; - -import java.util.Arrays; - - -/** - * @author Crystal.Sea - * - */ -public class UserInfo extends BaseDomain { - - /** - * - */ - private static final long serialVersionUID = 6402443942083382236L; - // - - protected String username; - - /** - * "Employee", "Supplier","Dealer","Contractor",Partner,Customer "Intern", - * "Temp", "External", and "Unknown" - */ - protected String userType; - protected String windowsAccount; - - // for user name - protected String displayName; - protected String nickName; - protected String nameZHSpell; - protected String nameZHShortSpell; - protected String givenName; - protected String middleName; - protected String familyName; - protected String honorificPrefix; - protected String honorificSuffix; - protected String formattedName; - - protected int married; - protected int gender; - protected String birthDate; - protected byte[] picture; - protected int idType; - protected String idCardNo; - protected String webSite; - protected String startWorkDate; - - // for security - protected int authnType; - protected String email; - protected String mobile; - protected int mobileVerified; - - protected String lastLoginTime; - protected String lastLoginIp; - protected String lastLogoffTime; - protected int passwordSetType; - protected Integer loginCount; - - protected String locale; - protected String timeZone; - protected String preferredLanguage; - - // for work - protected String workCountry; - protected String workRegion;// province; - protected String workLocality;// city; - protected String workStreetAddress; - protected String workAddressFormatted; - protected String workEmail; - protected String workPhoneNumber; - protected String workPostalCode; - protected String workFax; - // for home - protected String homeCountry; - protected String homeRegion;// province; - protected String homeLocality;// city; - protected String homeStreetAddress; - protected String homeAddressFormatted; - protected String homeEmail; - protected String homePhoneNumber; - protected String homePostalCode; - protected String homeFax; - // for company - protected String employeeNumber; - protected String costCenter; - protected String organization; - protected String division; - protected String departmentId; - protected String department; - protected String jobTitle; - protected String jobLevel; - protected String managerId; - protected String manager; - protected String assistantId; - protected String assistant; - protected String entryDate; - protected String quitDate; - - // for social contact - /** - * QQ WeiXin SinaWeibo Gtalk YiXin IMessage Skype Yahoo MSN Aim ICQ Xmpp - */ - protected String ims; - /* - * for extended Attribute from userType extraAttribute for database - * extraAttributeName & extraAttributeValue for page submit - */ - protected String extraAttribute; - - protected int online; - - public static class ONLINE { - // 在线 - public static int ONLINE = 0; - // 下线 - public static int OFFLINE = 1; - } - - public static class MARRIED { - // 未知 - public static int UNKNOWN = 0; - // 单身 - public static int SINGLE = 1; - // 结婚 - public static int MARRIED = 2; - // 离异 - public static int DIVORCE = 3; - // 丧偶 - public static int WIDOWED = 4; - - } - - public static class GENDER { - // 未知 - public static int UNKNOWN = 0; - // 女性 - public static int FEMALE = 1; - // 男性 - public static int MALE = 2; - } - - public static class IDTYPE { - // 未知 - public static int UNKNOWN = 0; - // 身份证 - public static int IDCARD = 1; - // 护照 - public static int PASSPORT = 2; - // 学生证 - public static int STUDENTCARD = 3; - // 军人证 - public static int MILITARYCARD = 4; - } - - public static class AUTHNTYPE { - // 用户名密码 - public static int NORMAL = 1; - // 手机 - public static int MOBILE = 2; - // 短信 - public static int SMS = 3; - // 邮箱 - public static int EMAIL = 4; - - public static int TIMEBASED_OPT = 5; - - public static int COUNTERBASED_OPT = 6; - - public static int HOTP_OPT = 7; - - public static int RSA_OPT = 8; - // 证书 - public static int CERTIFICATE = 9; - // usb证书 - public static int USBKEY = 10; - - } - - /** - * - */ - public UserInfo() { - super(); - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getUserType() { - return userType; - } - - public void setUserType(String userType) { - this.userType = userType; - } - - public String getWindowsAccount() { - return windowsAccount; - } - - public void setWindowsAccount(String windowsAccount) { - this.windowsAccount = windowsAccount; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public String getNameZHSpell() { - return nameZHSpell; - } - - public void setNameZHSpell(String nameZHSpell) { - this.nameZHSpell = nameZHSpell; - } - - public String getNameZHShortSpell() { - return nameZHShortSpell; - } - - public void setNameZHShortSpell(String nameZHShortSpell) { - this.nameZHShortSpell = nameZHShortSpell; - } - - public String getGivenName() { - return givenName; - } - - public void setGivenName(String givenName) { - this.givenName = givenName; - } - - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - public String getFamilyName() { - return familyName; - } - - public void setFamilyName(String familyName) { - this.familyName = familyName; - } - - public String getHonorificPrefix() { - return honorificPrefix; - } - - public void setHonorificPrefix(String honorificPrefix) { - this.honorificPrefix = honorificPrefix; - } - - public String getHonorificSuffix() { - return honorificSuffix; - } - - public void setHonorificSuffix(String honorificSuffix) { - this.honorificSuffix = honorificSuffix; - } - - public String getFormattedName() { - return formattedName; - } - - public void setFormattedName(String formattedName) { - this.formattedName = formattedName; - } - - public int getMarried() { - return married; - } - - public void setMarried(int married) { - this.married = married; - } - - public int getGender() { - return gender; - } - - public void setGender(int gender) { - this.gender = gender; - } - - public String getBirthDate() { - return birthDate; - } - - public void setBirthDate(String birthDate) { - this.birthDate = birthDate; - } - - public byte[] getPicture() { - return picture; - } - - public void setPicture(byte[] picture) { - this.picture = picture; - } - - public int getIdType() { - return idType; - } - - public void setIdType(int idType) { - this.idType = idType; - } - - public String getIdCardNo() { - return idCardNo; - } - - public void setIdCardNo(String idCardNo) { - this.idCardNo = idCardNo; - } - - public String getWebSite() { - return webSite; - } - - public void setWebSite(String webSite) { - this.webSite = webSite; - } - - public String getStartWorkDate() { - return startWorkDate; - } - - public void setStartWorkDate(String startWorkDate) { - this.startWorkDate = startWorkDate; - } - - public int getAuthnType() { - return authnType; - } - - public void setAuthnType(int authnType) { - this.authnType = authnType; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getMobile() { - return mobile; - } - - public void setMobile(String mobile) { - this.mobile = mobile; - } - - public int getMobileVerified() { - return mobileVerified; - } - - public void setMobileVerified(int mobileVerified) { - this.mobileVerified = mobileVerified; - } - - public String getLastLoginTime() { - return lastLoginTime; - } - - public void setLastLoginTime(String lastLoginTime) { - this.lastLoginTime = lastLoginTime; - } - - public String getLastLoginIp() { - return lastLoginIp; - } - - public void setLastLoginIp(String lastLoginIp) { - this.lastLoginIp = lastLoginIp; - } - - public String getLastLogoffTime() { - return lastLogoffTime; - } - - public void setLastLogoffTime(String lastLogoffTime) { - this.lastLogoffTime = lastLogoffTime; - } - - public int getPasswordSetType() { - return passwordSetType; - } - - public void setPasswordSetType(int passwordSetType) { - this.passwordSetType = passwordSetType; - } - - public Integer getLoginCount() { - return loginCount; - } - - public void setLoginCount(Integer loginCount) { - this.loginCount = loginCount; - } - - public String getLocale() { - return locale; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - public String getTimeZone() { - return timeZone; - } - - public void setTimeZone(String timeZone) { - this.timeZone = timeZone; - } - - public String getPreferredLanguage() { - return preferredLanguage; - } - - public void setPreferredLanguage(String preferredLanguage) { - this.preferredLanguage = preferredLanguage; - } - - public String getWorkCountry() { - return workCountry; - } - - public void setWorkCountry(String workCountry) { - this.workCountry = workCountry; - } - - public String getWorkRegion() { - return workRegion; - } - - public void setWorkRegion(String workRegion) { - this.workRegion = workRegion; - } - - public String getWorkLocality() { - return workLocality; - } - - public void setWorkLocality(String workLocality) { - this.workLocality = workLocality; - } - - public String getWorkStreetAddress() { - return workStreetAddress; - } - - public void setWorkStreetAddress(String workStreetAddress) { - this.workStreetAddress = workStreetAddress; - } - - public String getWorkAddressFormatted() { - return workAddressFormatted; - } - - public void setWorkAddressFormatted(String workAddressFormatted) { - this.workAddressFormatted = workAddressFormatted; - } - - public String getWorkEmail() { - return workEmail; - } - - public void setWorkEmail(String workEmail) { - this.workEmail = workEmail; - } - - public String getWorkPhoneNumber() { - return workPhoneNumber; - } - - public void setWorkPhoneNumber(String workPhoneNumber) { - this.workPhoneNumber = workPhoneNumber; - } - - public String getWorkPostalCode() { - return workPostalCode; - } - - public void setWorkPostalCode(String workPostalCode) { - this.workPostalCode = workPostalCode; - } - - public String getWorkFax() { - return workFax; - } - - public void setWorkFax(String workFax) { - this.workFax = workFax; - } - - public String getHomeCountry() { - return homeCountry; - } - - public void setHomeCountry(String homeCountry) { - this.homeCountry = homeCountry; - } - - public String getHomeRegion() { - return homeRegion; - } - - public void setHomeRegion(String homeRegion) { - this.homeRegion = homeRegion; - } - - public String getHomeLocality() { - return homeLocality; - } - - public void setHomeLocality(String homeLocality) { - this.homeLocality = homeLocality; - } - - public String getHomeStreetAddress() { - return homeStreetAddress; - } - - public void setHomeStreetAddress(String homeStreetAddress) { - this.homeStreetAddress = homeStreetAddress; - } - - public String getHomeAddressFormatted() { - return homeAddressFormatted; - } - - public void setHomeAddressFormatted(String homeAddressFormatted) { - this.homeAddressFormatted = homeAddressFormatted; - } - - public String getHomeEmail() { - return homeEmail; - } - - public void setHomeEmail(String homeEmail) { - this.homeEmail = homeEmail; - } - - public String getHomePhoneNumber() { - return homePhoneNumber; - } - - public void setHomePhoneNumber(String homePhoneNumber) { - this.homePhoneNumber = homePhoneNumber; - } - - public String getHomePostalCode() { - return homePostalCode; - } - - public void setHomePostalCode(String homePostalCode) { - this.homePostalCode = homePostalCode; - } - - public String getHomeFax() { - return homeFax; - } - - public void setHomeFax(String homeFax) { - this.homeFax = homeFax; - } - - public String getEmployeeNumber() { - return employeeNumber; - } - - public void setEmployeeNumber(String employeeNumber) { - this.employeeNumber = employeeNumber; - } - - public String getCostCenter() { - return costCenter; - } - - public void setCostCenter(String costCenter) { - this.costCenter = costCenter; - } - - public String getOrganization() { - return organization; - } - - public void setOrganization(String organization) { - this.organization = organization; - } - - public String getDivision() { - return division; - } - - public void setDivision(String division) { - this.division = division; - } - - public String getDepartmentId() { - return departmentId; - } - - public void setDepartmentId(String departmentId) { - this.departmentId = departmentId; - } - - public String getDepartment() { - return department; - } - - public void setDepartment(String department) { - this.department = department; - } - - public String getJobTitle() { - return jobTitle; - } - - public void setJobTitle(String jobTitle) { - this.jobTitle = jobTitle; - } - - public String getJobLevel() { - return jobLevel; - } - - public void setJobLevel(String jobLevel) { - this.jobLevel = jobLevel; - } - - public String getManagerId() { - return managerId; - } - - public void setManagerId(String managerId) { - this.managerId = managerId; - } - - public String getManager() { - return manager; - } - - public void setManager(String manager) { - this.manager = manager; - } - - public String getAssistantId() { - return assistantId; - } - - public void setAssistantId(String assistantId) { - this.assistantId = assistantId; - } - - public String getAssistant() { - return assistant; - } - - public void setAssistant(String assistant) { - this.assistant = assistant; - } - - public String getEntryDate() { - return entryDate; - } - - public void setEntryDate(String entryDate) { - this.entryDate = entryDate; - } - - public String getQuitDate() { - return quitDate; - } - - public void setQuitDate(String quitDate) { - this.quitDate = quitDate; - } - - public String getIms() { - return ims; - } - - public void setIms(String ims) { - this.ims = ims; - } - - public String getExtraAttribute() { - return extraAttribute; - } - - public void setExtraAttribute(String extraAttribute) { - this.extraAttribute = extraAttribute; - } - - public int getOnline() { - return online; - } - - public void setOnline(int online) { - this.online = online; - } - - @Override - public String toString() { - return "UserInfo [username=" + username + ", userType=" + userType - + ", windowsAccount=" + windowsAccount + ", displayName=" - + displayName + ", nickName=" + nickName + ", nameZHSpell=" - + nameZHSpell + ", nameZHShortSpell=" + nameZHShortSpell - + ", givenName=" + givenName + ", middleName=" + middleName - + ", familyName=" + familyName + ", honorificPrefix=" - + honorificPrefix + ", honorificSuffix=" + honorificSuffix - + ", formattedName=" + formattedName + ", married=" + married - + ", gender=" + gender + ", birthDate=" + birthDate - + ", picture=" + Arrays.toString(picture) + ", idType=" - + idType + ", idCardNo=" + idCardNo + ", webSite=" + webSite - + ", startWorkDate=" + startWorkDate + ", authnType=" - + authnType + ", email=" + email + ", mobile=" + mobile - + ", mobileVerified=" + mobileVerified + ", lastLoginTime=" - + lastLoginTime + ", lastLoginIp=" + lastLoginIp - + ", lastLogoffTime=" + lastLogoffTime + ", passwordSetType=" - + passwordSetType + ", loginCount=" + loginCount + ", locale=" - + locale + ", timeZone=" + timeZone + ", preferredLanguage=" - + preferredLanguage + ", workCountry=" + workCountry - + ", workRegion=" + workRegion + ", workLocality=" - + workLocality + ", workStreetAddress=" + workStreetAddress - + ", workAddressFormatted=" + workAddressFormatted - + ", workEmail=" + workEmail + ", workPhoneNumber=" - + workPhoneNumber + ", workPostalCode=" + workPostalCode - + ", workFax=" + workFax + ", homeCountry=" + homeCountry - + ", homeRegion=" + homeRegion + ", homeLocality=" - + homeLocality + ", homeStreetAddress=" + homeStreetAddress - + ", homeAddressFormatted=" + homeAddressFormatted - + ", homeEmail=" + homeEmail + ", homePhoneNumber=" - + homePhoneNumber + ", homePostalCode=" + homePostalCode - + ", homeFax=" + homeFax + ", employeeNumber=" + employeeNumber - + ", costCenter=" + costCenter + ", organization=" - + organization + ", division=" + division + ", departmentId=" - + departmentId + ", department=" + department + ", jobTitle=" - + jobTitle + ", jobLevel=" + jobLevel + ", managerId=" - + managerId + ", manager=" + manager + ", assistantId=" - + assistantId + ", assistant=" + assistant + ", entryDate=" - + entryDate + ", quitDate=" + quitDate + ", ims=" + ims - + ", extraAttribute=" + extraAttribute + ", online=" + online - + "]"; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthConnectionException.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthConnectionException.java deleted file mode 100644 index b793390c5..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthConnectionException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.exceptions; - -/** - * @author: Pablo Fernandez - */ -public class OAuthConnectionException extends OAuthException -{ - private static final String MSG = "There was a problem while creating a connection to the remote service."; - - public OAuthConnectionException(Exception e) - { - super(MSG, e); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthException.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthException.java deleted file mode 100644 index 3df1e3452..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthException.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.exceptions; - -/** - * Default scribe exception. - * Represents a problem in the OAuth signing process - * - * @author Pablo Fernandez - */ -public class OAuthException extends RuntimeException -{ - - /** - * Default constructor - * @param message message explaining what went wrong - * @param e original exception - */ - public OAuthException(String message, Exception e) - { - super(message, e); - } - - /** - * No-exception constructor. Used when there is no original exception - * - * @param message message explaining what went wrong - */ - public OAuthException(String message) - { - super(message, null); - } - - private static final long serialVersionUID = 1L; -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthParametersMissingException.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthParametersMissingException.java deleted file mode 100644 index 381357058..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthParametersMissingException.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.exceptions; - -import org.maxkey.client.oauth.model.*; - -/** - * Specialized exception that represents a missing OAuth parameter. - * - * @author Pablo Fernandez - */ -public class OAuthParametersMissingException extends OAuthException -{ - - private static final long serialVersionUID = 1745308760111976671L; - private static final String MSG = "Could not find oauth parameters in request: %s. " - + "OAuth parameters must be specified with the addOAuthParameter() method"; - - /** - * Default constructor. - * - * @param request OAuthRequest that caused the error - */ - public OAuthParametersMissingException(OAuthRequest request) - { - super(String.format(MSG, request)); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthSignatureException.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthSignatureException.java deleted file mode 100644 index fe76cc2ec..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/exceptions/OAuthSignatureException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.exceptions; - -/** - * Specialized exception that represents a problem in the signature - * - * @author Pablo Fernandez - */ -public class OAuthSignatureException extends OAuthException -{ - private static final long serialVersionUID = 1L; - private static final String MSG = "Error while signing string: %s"; - - /** - * Default constructor - * - * @param stringToSign plain string that gets signed (HMAC-SHA, etc) - * @param e original exception - */ - public OAuthSignatureException(String stringToSign, Exception e) - { - super(String.format(MSG, stringToSign), e); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/AccessTokenExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/AccessTokenExtractor.java deleted file mode 100644 index 54d7c4a0b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/AccessTokenExtractor.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import org.maxkey.client.oauth.model.*; - -/** - * Simple command object that extracts a {@link Token} from a String - * - * @author Pablo Fernandez - */ -public interface AccessTokenExtractor -{ - /** - * Extracts the access token from the contents of an Http Response - * - * @param response the contents of the response - * @return OAuth access token - */ - public Token extract(String response); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractor.java deleted file mode 100644 index 5b992f031..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractor.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import org.maxkey.client.oauth.model.*; - -/** - * Simple command object that extracts a base string from a {@link OAuthRequest} - * - * @author Pablo Fernandez - */ -public interface BaseStringExtractor -{ - /** - * Extracts an url-encoded base string from the {@link OAuthRequest}. - * - * See the oauth spec for more info on this. - * - * @param request the OAuthRequest - * @return the url-encoded base string - */ - String extract(OAuthRequest request); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractorImpl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractorImpl.java deleted file mode 100644 index 8c87c1dad..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/BaseStringExtractorImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - - -import org.maxkey.client.http.ParameterList; -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * Default implementation of {@link BaseStringExtractor}. Conforms to OAuth 1.0a - * - * @author Pablo Fernandez - * - */ -public class BaseStringExtractorImpl implements BaseStringExtractor -{ - - private static final String AMPERSAND_SEPARATED_STRING = "%s&%s&%s"; - - /** - * {@inheritDoc} - */ - public String extract(OAuthRequest request) - { - checkPreconditions(request); - String verb = HttpEncoder.encode(request.getVerb().name()); - String url = HttpEncoder.encode(request.getSanitizedUrl()); - String params = getSortedAndEncodedParams(request); - return String.format(AMPERSAND_SEPARATED_STRING, verb, url, params); - } - - private String getSortedAndEncodedParams(OAuthRequest request) - { - ParameterList params = new ParameterList(); - params.addAll(request.getQueryStringParams()); - params.addAll(request.getBodyParams()); - params.addAll(new ParameterList(request.getOauthParameters())); - return params.sort().asOauthBaseString(); - } - - private void checkPreconditions(OAuthRequest request) - { - Preconditions.checkNotNull(request, "Cannot extract base string from null object"); - - if (request.getOauthParameters() == null || request.getOauthParameters().size() <= 0) - { - throw new OAuthParametersMissingException(request); - } - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/GsonJsonTokenExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/GsonJsonTokenExtractor.java deleted file mode 100644 index d851068c2..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/GsonJsonTokenExtractor.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.JsonUtils; -import org.maxkey.client.utils.Preconditions; - -public class GsonJsonTokenExtractor implements AccessTokenExtractor { - - public Token extract(String response) { - System.out.println("extract a token from : " + response); - Preconditions.checkEmptyString(response,"Cannot extract a token from a null or empty String"); - try { - Token token; - try { - token = JsonUtils.gson2Object(response, Token.class); - } catch (Exception e) { - token = JsonUtils.gson2Object("{\""+ response.replace("&", "\",\"").replace("=","\":\"") + "\"}", Token.class); - } - - if (token != null) { - token.setRawResponse(response); - token.setToken(token.getAccess_token()); - } - - return token; - } catch (Exception e) { - throw new OAuthException("Cannot extract an acces token. Response was: " + response); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractor.java deleted file mode 100644 index e4d5271ee..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractor.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import org.maxkey.client.oauth.model.*; - -/** - * Simple command object that generates an OAuth Authorization header to include in the request. - * - * @author Pablo Fernandez - */ -public interface HeaderExtractor -{ - /** - * Generates an OAuth 'Authorization' Http header to include in requests as the signature. - * - * @param request the OAuthRequest to inspect and generate the header - * @return the Http header value - */ - String extract(OAuthRequest request); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractorImpl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractorImpl.java deleted file mode 100644 index f3fca611c..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/HeaderExtractorImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import java.util.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * Default implementation of {@link HeaderExtractor}. Conforms to OAuth 1.0a - * - * @author Pablo Fernandez - * - */ -public class HeaderExtractorImpl implements HeaderExtractor -{ - private static final String PARAM_SEPARATOR = ", "; - private static final String PREAMBLE = "OAuth "; - public static final int ESTIMATED_PARAM_LENGTH = 20; - - /** - * {@inheritDoc} - */ - public String extract(OAuthRequest request) - { - checkPreconditions(request); - Map parameters = request.getOauthParameters(); - StringBuilder header = new StringBuilder(parameters.size() * ESTIMATED_PARAM_LENGTH); - header.append(PREAMBLE); - for (Map.Entry entry : parameters.entrySet()) - { - if(header.length() > PREAMBLE.length()) - { - header.append(PARAM_SEPARATOR); - } - header.append(String.format("%s=\"%s\"", entry.getKey(), HttpEncoder.encode(entry.getValue()))); - } - return header.toString(); - } - - private void checkPreconditions(OAuthRequest request) - { - Preconditions.checkNotNull(request, "Cannot extract a header from a null object"); - - if (request.getOauthParameters() == null || request.getOauthParameters().size() <= 0) - { - throw new OAuthParametersMissingException(request); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/JsonTokenExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/JsonTokenExtractor.java deleted file mode 100644 index 70c197fc6..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/JsonTokenExtractor.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import java.util.regex.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.Preconditions; - -public class JsonTokenExtractor implements AccessTokenExtractor -{ - private Pattern accessTokenPattern = Pattern.compile("\"access_token\":\\s*\"(\\S*?)\""); - - public Token extract(String response) - { - Preconditions.checkEmptyString(response, "Cannot extract a token from a null or empty String"); - Matcher matcher = accessTokenPattern.matcher(response); - if(matcher.find()) - { - return new Token(matcher.group(1), "", response); - } - else - { - throw new OAuthException("Cannot extract an acces token. Response was: " + response); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/QQTokenExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/QQTokenExtractor.java deleted file mode 100644 index 02f05a23d..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/QQTokenExtractor.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import java.util.HashMap; - -import org.apache.log4j.Logger; -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.Preconditions; - -public class QQTokenExtractor implements AccessTokenExtractor -{ - final static Logger log = Logger.getLogger(QQTokenExtractor.class); - public Token extract(String response){ - - log.debug("extract a token from : "+response); - Preconditions.checkEmptyString(response, "Cannot extract a token from a null or empty String"); - try{ - - String [] fields=response.split("&"); - HashMap tokenMap=new HashMap(); - for(String field : fields){ - String [] sfield=field.split("="); - if(sfield.length==2){ - tokenMap.put(sfield[0], sfield[1]); - } - } - log.debug("token map : "+tokenMap); - Token token =new Token(tokenMap.get("access_token").toString(),"",response,tokenMap); - return token; - } - catch(Exception e){ - throw new OAuthException("Cannot extract an acces token. Response was: " + response); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/RequestTokenExtractor.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/RequestTokenExtractor.java deleted file mode 100644 index d5ffd5ef8..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/RequestTokenExtractor.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import org.maxkey.client.oauth.model.*; - -/** - * Simple command object that extracts a {@link Token} from a String - * - * @author Pablo Fernandez - */ -public interface RequestTokenExtractor -{ - /** - * Extracts the request token from the contents of an Http Response - * - * @param response the contents of the response - * @return OAuth access token - */ - public Token extract(String response); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractor20Impl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractor20Impl.java deleted file mode 100644 index a6509802f..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractor20Impl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import java.io.UnsupportedEncodingException; -import java.util.regex.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * Default implementation of {@AccessTokenExtractor}. Conforms to OAuth 2.0 - * - */ -public class TokenExtractor20Impl implements AccessTokenExtractor -{ - private static final String TOKEN_REGEX = "access_token=([^&]+)"; - private static final String EMPTY_SECRET = ""; - - /** - * {@inheritDoc} - */ - public Token extract(String response) - { - Preconditions.checkEmptyString(response, "Response body is incorrect. Can't extract a token from an empty string"); - - Matcher matcher = Pattern.compile(TOKEN_REGEX).matcher(response); - if (matcher.find()) - { - String token; - try { - token = HttpEncoder.decode(matcher.group(1)); - return new Token(token, EMPTY_SECRET, response); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return null; - } - else - { - throw new OAuthException("Response body is incorrect. Can't extract a token from this: '" + response + "'", null); - } - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractorImpl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractorImpl.java deleted file mode 100644 index 3f2331926..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/extractors/TokenExtractorImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.extractors; - -import java.io.UnsupportedEncodingException; -import java.util.regex.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.oauth.model.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * Default implementation of {@RequestTokenExtractor} and {@AccessTokenExtractor}. Conforms to OAuth 1.0a - * - * The process for extracting access and request tokens is similar so this class can do both things. - * - * @author Pablo Fernandez - */ -public class TokenExtractorImpl implements RequestTokenExtractor, AccessTokenExtractor -{ - private static final Pattern TOKEN_REGEX = Pattern.compile("oauth_token=([^&]+)"); - private static final Pattern SECRET_REGEX = Pattern.compile("oauth_token_secret=([^&]*)"); - - /** - * {@inheritDoc} - */ - public Token extract(String response){ - Preconditions.checkEmptyString(response, "Response body is incorrect. Can't extract a token from an empty string"); - String token = extract(response, TOKEN_REGEX); - String secret = extract(response, SECRET_REGEX); - return new Token(token, secret, response); - } - - private String extract(String response, Pattern p){ - Matcher matcher = p.matcher(response); - if (matcher.find() && matcher.groupCount() >= 1){ - try { - return HttpEncoder.decode(matcher.group(1)); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return null; - }else{ - throw new OAuthException("Response body is incorrect. Can't extract token and secret from this: '" + response + "'", null); - } - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConfig.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConfig.java deleted file mode 100644 index c00ecd537..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConfig.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.model; - -import java.io.*; - -import org.maxkey.client.http.SignatureType; - -/** - * Parameter object that groups OAuth config values - * - * @author Pablo Fernandez - */ -public class OAuthConfig { - private final String apiKey; - private final String apiSecret; - private final String callback; - private final SignatureType signatureType; - private final String scope; - private String approvalPrompt; // 授权方式:force or auto - private String responseType; // 返回类型:code、passwrod、token - private final OutputStream debugStream; - - public OAuthConfig(String key, String secret) { - this(key, secret, null, null, null, null); - } - - public OAuthConfig(String key, String secret, String callback) { - this(key, secret, callback, null, null, null); - } - - public OAuthConfig(String key, String secret, String callback, - SignatureType type, String scope, OutputStream stream) { - this.apiKey = key; - this.apiSecret = secret; - this.callback = callback; - this.signatureType = type; - this.scope = scope; - this.debugStream = stream; - } - - public String getApiKey() { - return apiKey; - } - - public String getApiSecret() { - return apiSecret; - } - - public String getCallback() { - return callback; - } - - public SignatureType getSignatureType() { - return signatureType; - } - - public String getScope() { - return scope; - } - - public boolean hasScope() { - return scope != null; - } - - public String getApprovalPrompt() { - return approvalPrompt; - } - - public void setApprovalPrompt(String approvalPrompt) { - this.approvalPrompt = approvalPrompt; - } - - public String getResponseType() { - return responseType; - } - - public void setResponseType(String responseType) { - this.responseType = responseType; - } - - public void log(String message) { - if (debugStream != null) { - message = message + "\n"; - try { - debugStream.write(message.getBytes("UTF8")); - } catch (Exception e) { - throw new RuntimeException( - "there were problems while writting to the debug stream", - e); - } - } - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConstants.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConstants.java deleted file mode 100644 index 5825c6655..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthConstants.java +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2010 Pablo Fernandez - -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. - */ -package org.maxkey.client.oauth.model; - - -/** - * This class contains OAuth constants, used project-wide - */ -public interface OAuthConstants { - - String TIMESTAMP = "oauth_timestamp"; - String SIGN_METHOD = "oauth_signature_method"; - String SIGNATURE = "oauth_signature"; - String CONSUMER_SECRET = "oauth_consumer_secret"; - String CONSUMER_KEY = "oauth_consumer_key"; - String CALLBACK = "oauth_callback"; - String VERSION = "oauth_version"; - String NONCE = "oauth_nonce"; - String REALM = "realm"; - String PARAM_PREFIX = "oauth_"; - String TOKEN = "oauth_token"; - String TOKEN_SECRET = "oauth_token_secret"; - String OUT_OF_BAND = "oob"; - String VERIFIER = "oauth_verifier"; - String HEADER = "Authorization"; - String SCOPE = "scope"; - String BASIC = "Basic"; - - // OAuth 2.0 - String ACCESS_TOKEN = "access_token"; - String CLIENT_ID = "client_id"; - String CLIENT_SECRET = "client_secret"; - String REDIRECT_URI = "redirect_uri"; - String CODE = "code"; - String REFRESH_TOKEN = "refresh_token"; - String GRANT_TYPE = "grant_type"; - String AUTHORIZATION_CODE = "authorization_code"; - String STATE = "state"; - String USERNAME = "username"; - String PASSWORD = "password"; - String RESPONSE_TYPE = "response_type"; - String RESPONSE_TYPE_CODE = "code"; - - //not OAuth specific - String USER_AGENT_HEADER_NAME = "User-Agent"; - - public static final Token EMPTY_TOKEN = new Token("", ""); -} - - diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthRequest.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthRequest.java deleted file mode 100644 index a05d01460..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/OAuthRequest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.model; - -import java.util.*; - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Request; - -/** - * The representation of an OAuth HttpRequest. - * - * Adds OAuth-related functionality to the {@link Request} - * - * @author Pablo Fernandez - */ -public class OAuthRequest extends Request -{ - private static final String OAUTH_PREFIX = "oauth_"; - private Map oauthParameters; - - /** - * Default constructor. - * - * @param verb Http verb/method - * @param url resource URL - */ - public OAuthRequest(HttpVerb verb, String url) - { - super(verb, url); - this.oauthParameters = new HashMap(); - } - - /** - * Adds an OAuth parameter. - * - * @param key name of the parameter - * @param value value of the parameter - * - * @throws IllegalArgumentException if the parameter is not an OAuth parameter - */ - public void addOAuthParameter(String key, String value) - { - oauthParameters.put(checkKey(key), value); - } - - public void addParameter(String key, String value) - { - oauthParameters.put(key, value); - } - - private String checkKey(String key) - { - if (key.startsWith(OAUTH_PREFIX) || key.equals(OAuthConstants.SCOPE)) - { - return key; - } - else - { - throw new IllegalArgumentException(String.format("OAuth parameters must either be '%s' or start with '%s'", OAuthConstants.SCOPE, OAUTH_PREFIX)); - } - } - - /** - * Returns the {@link Map} containing the key-value pair of parameters. - * - * @return parameters as map - */ - public Map getOauthParameters() - { - return oauthParameters; - } - - @Override - public String toString() - { - return String.format("@OAuthRequest(%s, %s)", getVerb(), getUrl()); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Token.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Token.java deleted file mode 100644 index b30b759dc..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Token.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.model; - -import java.io.*; -import java.util.Map; - -import org.maxkey.client.utils.Preconditions; - -/** - * Represents an OAuth 2 Access token. - *

- * http://tools.ietf.org/html/rfc6749#section-5.1 - * - * @see OAuth 2 Access Token Specification

- */ -public class Token implements Serializable { - private static final long serialVersionUID = 715000866082812683L; - - /* - * for return from Provider - */ - private String rawResponse; - private Map responseObject; - - /* - * for OAuth 1.0a & OAuth 2.0 - */ - /** - * access_token - *

- * REQUIRED. The access token issued by the authorization server.

- */ - private String access_token; - - private String token; - private String secret; - /** - * refresh_token - *

- * OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as - * described in http://tools.ietf.org/html/rfc6749#section-6

- */ - private String refresh_token; - /** - * expires_in - *

- * RECOMMENDED. The lifetime in seconds of the access token. For example, the value "3600" denotes that the access - * token will expire in one hour from the time the response was generated. If omitted, the authorization server - * SHOULD provide the expiration time via other means or document the default value.

- */ - private String expires_in; - - /** - * scope - *

- * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. The scope of the access token - * as described by http://tools.ietf.org/html/rfc6749#section-3.3

- */ - private String scope; - - private String signature; - /* - * for OpenID Connect - */ - /** - * token_type - *

- * REQUIRED. The type of the token issued as described in http://tools.ietf.org/html/rfc6749#section-7.1 Value is - * case insensitive.

- */ - private String token_type; - - private String id_token; - - /** - * https://self-issued.me - */ - private String sub_jwk; - /* - * for error - */ - private String error; - private String error_description; - - - /** - * - */ - public Token() { - rawResponse = null; - } - - /** - * Default constructor - * - * @param token - * token value. Can't be null. - * @param secret - * token secret. Can't be null. - */ - public Token(String token, String secret) { - this(token, secret, null); - } - - public Token(String token, String secret, String rawResponse) { - Preconditions.checkNotNull(token, "Token can't be null"); - Preconditions.checkNotNull(secret, "Secret can't be null"); - - this.token = token; - this.secret = secret; - this.rawResponse = rawResponse; - this.responseObject = null; - } - - public Token(String token, String secret, String rawResponse, - Map responseObject) { - this.token = token; - this.secret = secret; - this.rawResponse = rawResponse; - this.responseObject = responseObject; - } - - public String getAccess_token() { - if(access_token==null||access_token.equals("")){ - access_token=this.token; - } - - return access_token; - } - - public void setAccess_token(String access_token) { - this.access_token = access_token; - } - - public Map getResponseObject() { - return responseObject; - } - - public void setResponseObject(Map responseObject) { - this.responseObject = responseObject; - } - - public String getToken() { - if(token==null){ - token=this.access_token; - } - return token; - } - - public void setToken(String token) { - this.token = token; - } - - public String getSecret() { - return secret; - } - - public void setSecret(String secret) { - this.secret = secret; - } - - public String getRefresh_token() { - return refresh_token; - } - - public void setRefresh_token(String refresh_token) { - this.refresh_token = refresh_token; - } - - public String getExpires_in() { - return expires_in; - } - - public void setExpires_in(String expires_in) { - this.expires_in = expires_in; - } - - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public String getToken_type() { - return token_type; - } - - public void setToken_type(String token_type) { - this.token_type = token_type; - } - - public String getId_token() { - return id_token; - } - - public void setId_token(String id_token) { - this.id_token = id_token; - } - - public String getSub_jwk() { - return sub_jwk; - } - - public void setSub_jwk(String sub_jwk) { - this.sub_jwk = sub_jwk; - } - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } - - public String getError_description() { - return error_description; - } - - public void setError_description(String error_description) { - this.error_description = error_description; - } - - public void setRawResponse(String rawResponse) { - this.rawResponse = rawResponse; - } - - public String getScope() { - return scope; - } - - public void setScope(String scope) { - this.scope = scope; - } - - public String getRawResponse() { - if (rawResponse == null) { - throw new IllegalStateException( - "This token object was not constructed by scribe and does not have a rawResponse"); - } - return rawResponse; - } - - @Override - public String toString() { - return "Token [rawResponse=" + rawResponse + ", responseObject=" - + responseObject + ", access_token=" + access_token - + ", token=" + token + ", secret=" + secret - + ", refresh_token=" + refresh_token + ", expires_in=" - + expires_in + ", signature=" + signature + ", token_type=" - + token_type + ", id_token=" + id_token + ", sub_jwk=" - + sub_jwk + ", error=" + error + ", error_description=" - + error_description + "]"; - } - - /** - * Returns true if the token is empty (token = "", secret = "") - */ - public boolean isEmpty() { - return "".equals(this.token) && "".equals(this.secret); - } - - /** - * Factory method that returns an empty token (token = "", secret = ""). - * - * Useful for two legged OAuth. - */ - public static Token empty() { - return new Token("", ""); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (o == null || getClass() != o.getClass()) - return false; - - Token that = (Token) o; - return token.equals(that.token) && secret.equals(that.secret); - } - - @Override - public int hashCode() { - return 31 * token.hashCode() + secret.hashCode(); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Verifier.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Verifier.java deleted file mode 100644 index 92cdb719e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/model/Verifier.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.model; - -import org.maxkey.client.utils.Preconditions; - -/** - * Represents an OAuth verifier code. - * - * @author Pablo Fernandez - */ -public class Verifier -{ - - private final String value; - - /** - * Default constructor. - * - * @param value verifier value - */ - public Verifier(String value) - { - Preconditions.checkNotNull(value, "Must provide a valid string as verifier"); - this.value = value; - } - - public String getValue() - { - return value; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuth20ServiceImpl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuth20ServiceImpl.java deleted file mode 100644 index 422e9ae05..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuth20ServiceImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.oauth; - - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Response; -import org.maxkey.client.oauth.builder.api.*; -import org.maxkey.client.oauth.model.*; - -public class OAuth20ServiceImpl implements OAuthService -{ - private static final String VERSION = "2.0"; - - private final DefaultApi20 api; - private final OAuthConfig config; - - /** - * Default constructor - * - * @param api OAuth2.0 api information - * @param config OAuth 2.0 configuration param object - */ - public OAuth20ServiceImpl(DefaultApi20 api, OAuthConfig config) - { - this.api = api; - this.config = config; - } - - - /** - * Default constructor - * - * @param clientId - * @param clientSecret - * @param redirectUri - */ - public OAuth20ServiceImpl(String clientId, String clientSecret,String redirectUri) - { - this.api=new MaxkeyApi20(); - this.config =new OAuthConfig(clientId,clientSecret,redirectUri); - - } - - /** - * {@inheritDoc} - */ - public Token getAccessToken(Token requestToken, Verifier verifier) - { - OAuthRequest request = new OAuthRequest(api.getAccessTokenVerb(), api.getAccessTokenEndpoint()); - if(api.getAccessTokenVerb().equals(HttpVerb.GET)){ - request.addQuerystringParameter(OAuthConstants.CLIENT_ID, config.getApiKey()); - request.addQuerystringParameter(OAuthConstants.CLIENT_SECRET, config.getApiSecret()); - request.addQuerystringParameter(OAuthConstants.CODE, verifier.getValue()); - request.addQuerystringParameter(OAuthConstants.REDIRECT_URI, config.getCallback()); - if(config.hasScope()) request.addQuerystringParameter(OAuthConstants.SCOPE, config.getScope()); - }else{ - request.getBodyParams().add(OAuthConstants.CLIENT_ID, config.getApiKey()); - request.getBodyParams().add(OAuthConstants.CLIENT_SECRET, config.getApiSecret()); - request.getBodyParams().add(OAuthConstants.CODE, verifier.getValue()); - request.getBodyParams().add(OAuthConstants.REDIRECT_URI, config.getCallback()); - request.getBodyParams().add(OAuthConstants.GRANT_TYPE, api.getGrantType()); - if(config.hasScope())request.getBodyParams().add(OAuthConstants.SCOPE, config.getScope()); - } - - Response response = request.send(); - return api.getAccessTokenExtractor().extract(response.getBody()); - } - - /** - * {@inheritDoc} - */ - public Token getRequestToken() - { - throw new UnsupportedOperationException("Unsupported operation, please use 'getAuthorizationUrl' and redirect your users there"); - } - - /** - * {@inheritDoc} - */ - public String getVersion() - { - return VERSION; - } - - /** - * {@inheritDoc} - */ - public void signRequest(Token accessToken, OAuthRequest request) - { - request.addQuerystringParameter(OAuthConstants.ACCESS_TOKEN, accessToken.getToken()); - } - - /** - * {@inheritDoc} - */ - public String getAuthorizationUrl(Token requestToken) - { - return api.getAuthorizationUrl(config); - } - @Override - public void signAccessTokenRequest(Token accessToken, OAuthRequest request) { - // TODO Auto-generated method stub - request.addQuerystringParameter(OAuthConstants.ACCESS_TOKEN, accessToken.getToken()); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthPasswordService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthPasswordService.java deleted file mode 100644 index 2313babd3..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthPasswordService.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.oauth; - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Response; -import org.maxkey.client.oauth.builder.ServiceBuilder; -import org.maxkey.client.oauth.builder.api.MaxkeyPasswordApi20; -import org.maxkey.client.oauth.model.OAuthConfig; -import org.maxkey.client.oauth.model.OAuthRequest; -import org.maxkey.client.oauth.model.Token; - - -/** - * OAuth 2.0 api. - */ -public class OAuthPasswordService { - - private OAuthConfig config; - - private MaxkeyPasswordApi20 passwordApi20; - - public OAuthPasswordService() { - super(); - } - - public OAuthPasswordService(OAuthConfig config,MaxkeyPasswordApi20 passwordApi20) { - super(); - this.passwordApi20=passwordApi20; - this.config = config; - } - - public Token getAccessToken(String username, String password) { - try { - String accessTokenUrl=passwordApi20.getAuthorizationUrl(config, username, password); - System.out.println(accessTokenUrl); - OAuthRequest oauthRequest = new OAuthRequest(HttpVerb.GET,accessTokenUrl); - Response response = oauthRequest.send(); - return passwordApi20.getAccessTokenExtractor().extract(response.getBody()); - } catch(Exception e) { - e.printStackTrace(); - } - return null; - } - - public Response sendRequest(Token accessToken,HttpVerb requestMethod,String requestUrl) { - OAuthRequest oauthRequest = new OAuthRequest(requestMethod, requestUrl); - ServiceBuilder builder = new ServiceBuilder().provider(passwordApi20) - .apiKey(config.getApiKey()) - .apiSecret(config.getApiSecret()) - .callback(config.getCallback()); - OAuthService oAuthService=builder.build(); - oAuthService.signRequest(accessToken, oauthRequest); - return oauthRequest.send(); - } - public OAuthConfig getConfig() { - return config; - } - - public void setConfig(OAuthConfig config) { - this.config = config; - } - - public MaxkeyPasswordApi20 getPasswordApi20() { - return passwordApi20; - } - - public void setPasswordApi20(MaxkeyPasswordApi20 passwordApi20) { - this.passwordApi20 = passwordApi20; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthService.java deleted file mode 100644 index 4e8cc7566..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/oauth/OAuthService.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.oauth; - -import org.maxkey.client.oauth.model.*; - -/** - * The main Scribe object. - * - * A facade responsible for the retrieval of request and access tokens and for the signing of HTTP requests. - * - * @author Pablo Fernandez - */ -public interface OAuthService -{ - /** - * Retrieve the request token. - * - * @return request token - */ - public Token getRequestToken(); - - /** - * Retrieve the access token - * - * @param requestToken request token (obtained previously) - * @param verifier verifier code - * @return access token - */ - public Token getAccessToken(Token requestToken, Verifier verifier); - - /** - * Signs am OAuth request - * - * @param accessToken access token (obtained previously) - * @param request request to sign - */ - public void signRequest(Token accessToken, OAuthRequest request); - - - public void signAccessTokenRequest(Token accessToken, OAuthRequest request); - - /** - * Returns the OAuth version of the service. - * - * @return oauth version as string - */ - public String getVersion(); - - /** - * Returns the URL where you should redirect your users to authenticate - * your application. - * - * @param requestToken the request token you need to authorize - * @return the URL where you should redirect your users - */ - public String getAuthorizationUrl(Token requestToken); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/Base64Encoder.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/Base64Encoder.java deleted file mode 100644 index 3f4996be9..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/Base64Encoder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -public abstract class Base64Encoder -{ - private static Base64Encoder instance; - - public static synchronized Base64Encoder getInstance() - { - if (instance == null) - { - instance = createEncoderInstance(); - } - return instance; - } - - private static Base64Encoder createEncoderInstance() - { - if (CommonsEncoder.isPresent()) - { - return new CommonsEncoder(); - } - else - { - return new DatatypeConverterEncoder(); - } - } - - public static String type() - { - return getInstance().getType(); - } - - public abstract String encode(byte[] bytes); - - public abstract String getType(); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/CommonsEncoder.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/CommonsEncoder.java deleted file mode 100644 index cdc9ddc43..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/CommonsEncoder.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -import org.apache.commons.codec.binary.*; -import org.maxkey.client.oauth.exceptions.*; - -import java.io.UnsupportedEncodingException; - -public class CommonsEncoder extends Base64Encoder -{ - - @Override - public String encode(byte[] bytes) - { - try - { - return new String(Base64.encodeBase64(bytes), "UTF-8"); - } - catch (UnsupportedEncodingException e) - { - throw new OAuthSignatureException("Can't perform base64 encoding", e); - } - } - - @Override - public String getType() - { - return "CommonsCodec"; - } - - public static boolean isPresent() - { - try - { - Class.forName("org.apache.commons.codec.binary.Base64"); - return true; - } - catch (ClassNotFoundException e) - { - return false; - } - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/DatatypeConverterEncoder.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/DatatypeConverterEncoder.java deleted file mode 100644 index 62fa5b352..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/DatatypeConverterEncoder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -import javax.xml.bind.*; - -public class DatatypeConverterEncoder extends Base64Encoder -{ - @Override - public String encode(byte[] bytes) - { - return DatatypeConverter.printBase64Binary(bytes); - } - - @Override - public String getType() - { - return "DatatypeConverter"; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/HMACSha1SignatureService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/HMACSha1SignatureService.java deleted file mode 100644 index b4a425fbb..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/HMACSha1SignatureService.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -import javax.crypto.*; -import javax.crypto.spec.*; - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * HMAC-SHA1 implementation of {@SignatureService} - * - * @author Pablo Fernandez - * - */ -public class HMACSha1SignatureService implements SignatureService -{ - private static final String EMPTY_STRING = ""; - private static final String CARRIAGE_RETURN = "\r\n"; - private static final String UTF8 = "UTF-8"; - private static final String HMAC_SHA1 = "HmacSHA1"; - private static final String METHOD = "HMAC-SHA1"; - - /** - * {@inheritDoc} - */ - public String getSignature(String baseString, String apiSecret, String tokenSecret) - { - try - { - Preconditions.checkEmptyString(baseString, "Base string cant be null or empty string"); - Preconditions.checkEmptyString(apiSecret, "Api secret cant be null or empty string"); - return doSign(baseString, HttpEncoder.encode(apiSecret) + '&' + HttpEncoder.encode(tokenSecret)); - } - catch (Exception e) - { - throw new OAuthSignatureException(baseString, e); - } - } - - private String doSign(String toSign, String keyString) throws Exception - { - SecretKeySpec key = new SecretKeySpec((keyString).getBytes(UTF8), HMAC_SHA1); - Mac mac = Mac.getInstance(HMAC_SHA1); - mac.init(key); - byte[] bytes = mac.doFinal(toSign.getBytes(UTF8)); - return bytesToBase64String(bytes).replace(CARRIAGE_RETURN, EMPTY_STRING); - } - - private String bytesToBase64String(byte[] bytes) - { - return Base64Encoder.getInstance().encode(bytes); - } - - /** - * {@inheritDoc} - */ - public String getSignatureMethod() - { - return METHOD; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/PlaintextSignatureService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/PlaintextSignatureService.java deleted file mode 100644 index a8aaeacb0..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/PlaintextSignatureService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - - -import org.maxkey.client.oauth.exceptions.*; -import org.maxkey.client.utils.HttpEncoder; -import org.maxkey.client.utils.Preconditions; - -/** - * plaintext implementation of {@SignatureService} - * - * @author Pablo Fernandez - * - */ -public class PlaintextSignatureService implements SignatureService -{ - private static final String METHOD = "PLAINTEXT"; - - /** - * {@inheritDoc} - */ - public String getSignature(String baseString, String apiSecret, String tokenSecret) - { - try - { - Preconditions.checkEmptyString(apiSecret, "Api secret cant be null or empty string"); - return HttpEncoder.encode(apiSecret) + '&' + HttpEncoder.encode(tokenSecret); - } - catch (Exception e) - { - throw new OAuthSignatureException(baseString, e); - } - } - - /** - * {@inheritDoc} - */ - public String getSignatureMethod() - { - return METHOD; - } -} - diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/RSASha1SignatureService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/RSASha1SignatureService.java deleted file mode 100644 index 7cbd95c0e..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/RSASha1SignatureService.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -import java.security.*; - -import org.maxkey.client.oauth.exceptions.*; - -/** - * A signature service that uses the RSA-SHA1 algorithm. - */ -public class RSASha1SignatureService implements SignatureService -{ - private static final String METHOD = "RSA-SHA1"; - private static final String RSA_SHA1 = "SHA1withRSA"; - private static final String UTF8 = "UTF-8"; - - private PrivateKey privateKey; - - public RSASha1SignatureService(PrivateKey privateKey) - { - this.privateKey = privateKey; - } - - /** - * {@inheritDoc} - */ - public String getSignature(String baseString, String apiSecret, String tokenSecret) - { - try - { - Signature signature = Signature.getInstance(RSA_SHA1); - signature.initSign(privateKey); - signature.update(baseString.getBytes(UTF8)); - return bytesToBase64String(signature); - } - catch (Exception e) - { - throw new OAuthSignatureException(baseString, e); - } - } - - private String bytesToBase64String(Signature signature) throws SignatureException - { - return Base64Encoder.getInstance().encode(signature.sign()); - } - - /** - * {@inheritDoc} - */ - public String getSignatureMethod() - { - return METHOD; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/SignatureService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/SignatureService.java deleted file mode 100644 index f457dacd5..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/SignatureService.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -/** - * Signs a base string, returning the OAuth signature - * - * @author Pablo Fernandez - * - */ -public interface SignatureService -{ - /** - * Returns the signature - * - * @param baseString url-encoded string to sign - * @param apiSecret api secret for your app - * @param tokenSecret token secret (empty string for the request token step) - * - * @return signature - */ - public String getSignature(String baseString, String apiSecret, String tokenSecret); - - /** - * Returns the signature method/algorithm - * - * @return - */ - public String getSignatureMethod(); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampService.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampService.java deleted file mode 100644 index 201c6b765..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampService.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -/** - * Unix epoch timestamp generator. - * - * This class is useful for stubbing in tests. - * - * @author Pablo Fernandez - */ -public interface TimestampService -{ - /** - * Returns the unix epoch timestamp in seconds - * - * @return timestamp - */ - public String getTimestampInSeconds(); - - /** - * Returns a nonce (unique value for each request) - * - * @return nonce - */ - public String getNonce(); -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampServiceImpl.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampServiceImpl.java deleted file mode 100644 index 46125a5a2..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/oauth/services/TimestampServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.services; - -import java.util.*; - -/** - * Implementation of {@link TimestampService} using plain java classes. - * - * @author Pablo Fernandez - */ -public class TimestampServiceImpl implements TimestampService -{ - private Timer timer; - - /** - * Default constructor. - */ - public TimestampServiceImpl() - { - timer = new Timer(); - } - - /** - * {@inheritDoc} - */ - public String getNonce() - { - Long ts = getTs(); - return String.valueOf(ts + timer.getRandomInteger()); - } - - /** - * {@inheritDoc} - */ - public String getTimestampInSeconds() - { - return String.valueOf(getTs()); - } - - private Long getTs() - { - return timer.getMilis() / 1000; - } - - void setTimer(Timer timer) - { - this.timer = timer; - } - - /** - * Inner class that uses {@link System} for generating the timestamps. - * - * @author Pablo Fernandez - */ - static class Timer - { - private final Random rand = new Random(); - Long getMilis() - { - return System.currentTimeMillis(); - } - - Integer getRandomInteger() - { - return rand.nextInt(); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/package-info.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/package-info.java deleted file mode 100644 index 47a977082..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -/** - * @author Administrator - * - */ -package org.maxkey.client; diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/tokenbase/TokenUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/tokenbase/TokenUtils.java deleted file mode 100644 index 41ee5c186..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/tokenbase/TokenUtils.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.tokenbase; - -import java.io.UnsupportedEncodingException; -import java.util.HashMap; - -import org.apache.commons.codec.DecoderException; -import org.apache.commons.codec.binary.Hex; -import org.maxkey.client.crypto.Base64Utils; -import org.maxkey.client.crypto.ReciprocalUtils; -import org.maxkey.client.utils.JsonUtils; - -public class TokenUtils { - - public static String decode(String tokenString,String algorithmKey, String algorithm){ - String token=ReciprocalUtils.decoder(Base64Utils.base64UrlDecode(tokenString), algorithmKey, algorithm); - - - try { - token=new String(Hex.decodeHex(token.toCharArray()),"UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } catch (DecoderException e) { - e.printStackTrace(); - } - - return token; - } - - public static String [] parseSimpleBasedToken(String token){ - return new String[] {token.substring(0, token.indexOf("@@")), - token.substring(token.indexOf("@@")+2)}; - } - - @SuppressWarnings("unchecked") - public static HashMap parseJsonBasedToken(String token){ - HashMap tokenMap=new HashMap(); - - tokenMap=JsonUtils.gson2Object(token, tokenMap.getClass()); - - return tokenMap; - } - - public static void main(String[] args) { - // TODO Auto-generated method stub - String token="634d23bf64c20ae937eb9b81dbe9c30969d2d569c8c6c3b9d8089bff8c910c07722ca1f4137132fefb380fb8dd011e71e5b1df84b73088629b85f07a3559c7d9"; - // ZpqjxUOX3QuE8rwl6etstU0z2WO%2Flpo5 - String tokenString=TokenUtils.decode(token, "x8zPbCya", ReciprocalUtils.Algorithm.DES); - System.out.println(tokenString); - - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/JsonUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/JsonUtils.java deleted file mode 100644 index c1ffc8f36..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/JsonUtils.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public class JsonUtils { - - - /** - * Transform json string to java bean object use Gson - * @param - * @param json - * @param Class - * @return Object - */ - - public static T gson2Object(String json,Class cls){ - T newBean = (new Gson()).fromJson(json, cls); - return newBean; - } - - - /** - * Transform java bean object to json string use Gson - * @param bean - * @return string - */ - public static String gson2Json(Object bean){ - String json=""; - // convert java object to JSON format, - // and returned as JSON formatted string - json = (new Gson()).toJson(bean); - - return json; - } - - /** - * prettyJson use Gson - * @param bean - * @return String - */ - public static String gsonPretty(Object bean){ - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - String json = gson.toJson(bean); - return json; - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/MapUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/MapUtils.java deleted file mode 100644 index f9370feee..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/MapUtils.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.util.Map; - -public abstract class MapUtils { - - public static String toString(Map map) { - if (map == null) { - return ""; - } - if (map.isEmpty()) { - return "{}"; - } - - final StringBuilder result = new StringBuilder(); - for (Map.Entry entry : map.entrySet()) { - result.append(", ") - .append(entry.getKey().toString()) - .append(" -> ") - .append(entry.getValue().toString()) - .append(' '); - } - return "{" + result.append('}').substring(1); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/PathUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/PathUtils.java deleted file mode 100644 index 7db2b1b7a..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/PathUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.io.UnsupportedEncodingException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -public class PathUtils { - private final Log log = LogFactory.getLog(getClass()); - private static PathUtils instance = null; - private String classPath; - - public static synchronized PathUtils getInstance() { - if (instance == null) { - instance = new PathUtils(); - instance.log.debug("getInstance()" +" new ConfigFile instance"); - } - return instance; - } - - public PathUtils() { - try { - classPath = java.net.URLDecoder.decode(PathUtils.class.getResource("PathUtilsFile.properties").getFile(),"UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - String fileProtocol=PathUtils.class.getResource("PathUtilsFile.properties").getProtocol(); - log.info("getWebRoot getProtocol:"+PathUtils.class.getResource("PathUtilsFile.properties").getProtocol()); - if(fileProtocol.equalsIgnoreCase("file")){ - // /D:/SoftWare/apache-tomcat-5.5.30/webapps/app - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(fileProtocol.equalsIgnoreCase("jar")){ - // file:/D:/SoftWare/apache-tomcat-5.5.30/webapps/app - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(fileProtocol.equalsIgnoreCase("wsjar")){ - if(classPath.indexOf("file:")==0){ - classPath=classPath.substring(5, classPath.length()); - } - }else if(classPath.equalsIgnoreCase("file:")){ - classPath=classPath.substring(5, classPath.length()); - } - - /// /WEB-INF/ - if(classPath.indexOf("/WEB-INF/")!=-1){ - classPath=classPath.substring(0, classPath.indexOf("/WEB-INF/")); - } - - log.info("getWebRoot() webApp root Path : "+classPath); - } - - public String getWebInf(){ - return classPath+"/WEB-INF/"; - } - - - public String getClassPath(){ - return classPath+"/WEB-INF/classes/"; - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/Preconditions.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/Preconditions.java deleted file mode 100644 index 3ed0f5c4b..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/Preconditions.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.util.Locale; -import java.util.regex.Pattern; - -import org.maxkey.client.oauth.model.OAuthConstants; - -/** - * Utils for checking preconditions and invariants - */ -public abstract class Preconditions { - - private static final String DEFAULT_MESSAGE = "Received an invalid parameter"; - - // scheme = alpha *( alpha | digit | "+" | "-" | "." ) - private static final String URL_REGEXP = "^[a-zA-Z][a-zA-Z0-9+.-]*://\\S+"; - - /** - * Checks that an object is not null. - * - * @param object any object - * @param errorMsg error message - * - * @throws IllegalArgumentException if the object is null - */ - public static void checkNotNull(Object object, String errorMsg) { - check(object != null, errorMsg); - } - - /** - * Checks that a string is not null or empty - * - * @param string any string - * @param errorMsg error message - * - * @throws IllegalArgumentException if the string is null or empty - */ - public static void checkEmptyString(String string, String errorMsg) { - check(string != null && !string.trim().isEmpty(), errorMsg); - } - - /** - * Checks that a URL is valid - * - * @param url any string - * @param errorMsg error message - */ - public static void checkValidUrl(String url, String errorMsg) { - checkEmptyString(url, errorMsg); - check(isUrl(url), errorMsg); - } - - /** - * Checks that a URL is a valid OAuth callback - * - * @param url any string - * @param errorMsg error message - */ - public static void checkValidOAuthCallback(String url, String errorMsg) { - checkEmptyString(url, errorMsg); - if (url.toLowerCase(Locale.getDefault()).compareToIgnoreCase(OAuthConstants.OUT_OF_BAND) != 0) { - check(isUrl(url), errorMsg); - } - } - - private static boolean isUrl(String url) { - return Pattern.compile(URL_REGEXP).matcher(url).matches(); - } - - private static void check(boolean requirements, String error) { - if (!requirements) { - throw new IllegalArgumentException(error == null || error.trim().length() <= 0 ? DEFAULT_MESSAGE : error); - } - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StreamUtils.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StreamUtils.java deleted file mode 100644 index 9a8d67c09..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StreamUtils.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.zip.GZIPInputStream; - -/** - * Utils to deal with Streams. - */ -public abstract class StreamUtils { - - /** - * Returns the stream contents as an UTF-8 encoded string - * - * @param is input stream - * @return string contents - * @throws java.io.IOException in any. SocketTimeout in example - */ - public static String getStreamContents(InputStream is) throws IOException { - Preconditions.checkNotNull(is, "Cannot get String from a null object"); - final char[] buffer = new char[0x10000]; - final StringBuilder out = new StringBuilder(); - try (Reader in = new InputStreamReader(is, "UTF-8")) { - int read; - do { - read = in.read(buffer, 0, buffer.length); - if (read > 0) { - out.append(buffer, 0, read); - } - } while (read >= 0); - } - return out.toString(); - } - - /** - * Return String content from a gzip stream - * - * @param is input stream - * @return string contents - * @throws java.io.IOException in any. SocketTimeout in example - */ - public static String getGzipStreamContents(InputStream is) throws IOException { - Preconditions.checkNotNull(is, "Cannot get String from a null object"); - final GZIPInputStream gis = new GZIPInputStream(is); - return getStreamContents(gis); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StringGenerator.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StringGenerator.java deleted file mode 100644 index b564b74c8..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/StringGenerator.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.lang.management.ManagementFactory; -import java.security.SecureRandom; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Random; -import java.util.UUID; - -import org.maxkey.client.crypto.Base64Utils; - -public class StringGenerator { - - private static final int MAX_PID = 65536; - - private char[] DEFAULT_CODEC = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_NUMBER = "1234567890".toCharArray(); - - public static final char[] DEFAULT_CODE_LOWERCASE = "abcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray(); - - public static final char[] DEFAULT_CODE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static final char[] DEFAULT_CODE_NUMBER_LETTERS = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); - - public static int processId; - - private static final String uuidRegex = "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$"; - - - private Random random = new SecureRandom(); - - private int length; - - static { - final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); - int index = jvmName.indexOf('@'); - if (index < 1) - throw new RuntimeException("Could not get PID"); - - try { - processId= Integer.parseInt(jvmName.substring(0, index)) % MAX_PID; - } catch (NumberFormatException e) { - throw new RuntimeException("Could not get PID"); - } - } - - /** - * Create a generator with the default length (6). - */ - public StringGenerator() { - this(6); - } - - /** - * Create a generator of random strings of the length provided - * - * @param length the length of the strings generated - */ - public StringGenerator(int length) { - this.length = length; - } - - public StringGenerator(char[] defaultCode,int length) { - this.DEFAULT_CODEC=defaultCode; - this.length = length; - } - - public String randomGenerate() { - byte[] verifierBytes = new byte[length]; - random.nextBytes(verifierBytes); - return getString(verifierBytes); - } - - public String uuidGenerate() { - return UUID.randomUUID().toString().toLowerCase(); - } - - public String uniqueGenerate() { - StringBuffer uniqueString=new StringBuffer(""); - - this.length=9; - String randomString =randomGenerate(); - uniqueString.append(randomString.subSequence(0, 4)); - - Date currentDate=new Date(); - DateFormat dateFormat = new SimpleDateFormat("ddMMyyyyHHmmssSSS"); - String dateString=Base64Utils.encodeBase64(dateFormat.format(currentDate).getBytes()); - dateString=dateString.substring(0, dateString.length()-1); - uniqueString.append(dateString); - - uniqueString.append(randomString.subSequence(5, 8)); - - return uniqueString.toString(); - } - - /** - * Convert these random bytes to a verifier string. The length of the byte array can be - * {@link #setLength(int) configured}. The default implementation mods the bytes to fit into the - * ASCII letters 1-9, A-Z, a-z . - * - * @param verifierBytes The bytes. - * @return The string. - */ - protected String getString(byte[] verifierBytes) { - char[] chars = new char[verifierBytes.length]; - for (int i = 0; i < verifierBytes.length; i++) { - chars[i] = DEFAULT_CODEC[((verifierBytes[i] & 0xFF) % DEFAULT_CODEC.length)]; - } - return new String(chars); - } - - /** - * The random value generator used to create token secrets. - * - * @param random The random value generator used to create token secrets. - */ - public void setRandom(Random random) { - this.random = random; - } - - /** - * The length of string to generate. - * - * @param length the length to set - */ - public void setLength(int length) { - this.length = length; - } - - - public static boolean uuidMatches(String uuidString) { - return uuidString.matches(uuidRegex); - } - -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/AuthenticationFilter.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/AuthenticationFilter.java deleted file mode 100644 index a8fc21795..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/AuthenticationFilter.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.web.authn; - -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.maxkey.client.oauth.OAuthClient; -import org.maxkey.client.oauth.builder.ServiceBuilder; -import org.maxkey.client.oauth.builder.api.MaxkeyApi20; -import org.maxkey.client.oauth.domain.UserInfo; -import org.maxkey.client.oauth.model.Token; -import org.maxkey.client.oauth.model.Verifier; -import org.maxkey.client.oauth.oauth.OAuthService; - - - -/** - * - * @author Crystal.Sea - */ -public class AuthenticationFilter implements Filter { - - private static Log log = LogFactory.getLog(AuthenticationFilter. class ); - - private static final String UUID_REGEX = "^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$"; - - public static final String CONST_MAXKEY_USERINFO="CONST_MAXKEY_USERINFO"; - - private String clientId; - private String clientSecret; - private String callBackUri; - private boolean enable; - private OAuthService service ; - - public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { - - HttpServletRequest httpServletRequest = (HttpServletRequest) request; - HttpServletResponse httpServletResponse = (HttpServletResponse) response; - HttpSession session = httpServletRequest.getSession(); - - if(enable){ - Token EMPTY_TOKEN = null; - String code=request.getParameter("code"); - - if(code!=null&&uuidMatches(code)){ - Verifier verifier = new Verifier(code); - Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier); - log.debug(" access token is "+accessToken); - - OAuthClient restClient=new OAuthClient(OAuthClient.OAUTH_V20_USERINFO_URI); - - UserInfo userInfo=restClient.getUserInfo(accessToken.getToken()); - - session.setAttribute(CONST_MAXKEY_USERINFO, userInfo); - - }else if(session.getAttribute(CONST_MAXKEY_USERINFO)==null){ - String authorizationUrl = service.getAuthorizationUrl(EMPTY_TOKEN); - log.debug("Redirect to authorization Url : "+authorizationUrl); - httpServletResponse.sendRedirect(authorizationUrl); - } - } - - chain.doFilter(request, response); - } - - public void destroy() { - this.destroy(); - } - - public void init(FilterConfig config) throws ServletException { - this.clientId=config.getInitParameter("clientId"); - this.clientSecret=config.getInitParameter("clientSecret"); - this.callBackUri=config.getInitParameter("callBackUri"); - this.enable=config.getInitParameter("enable").equalsIgnoreCase("true"); - - log.debug("client_id : "+clientId); - log.debug("client_secret : "+clientSecret); - log.debug("callBack Uri : "+callBackUri); - log.debug("enable : "+enable); - - service = new ServiceBuilder() - .provider(MaxkeyApi20.class) - .apiKey(this.clientId) - .apiSecret(this.clientSecret) - .callback(this.callBackUri) - .build(); - log.debug(" init."); - } - - public static boolean uuidMatches(String uuidString) { - return uuidString.matches(UUID_REGEX); - } -} diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/SingleSignOutFilter.java b/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/SingleSignOutFilter.java deleted file mode 100644 index 144d5919d..000000000 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/web/authn/SingleSignOutFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.web.authn; - -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * - * @author Crystal.Sea - */ -public class SingleSignOutFilter implements Filter { - private static final Logger log = LoggerFactory.getLogger(SingleSignOutFilter.class); - private String singleSignOutEndpoint; - - public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { - - HttpServletRequest httpServletRequest = (HttpServletRequest) request; - HttpServletResponse httpServletResponse = (HttpServletResponse) response; - - HttpSession session = httpServletRequest.getSession(); - session.removeAttribute(AuthenticationFilter.CONST_MAXKEY_USERINFO); - session.invalidate(); - - httpServletResponse.sendRedirect(singleSignOutEndpoint); - - chain.doFilter(request, response); - } - - public void destroy() { - this.destroy(); - } - - public void init(FilterConfig config) throws ServletException { - this.singleSignOutEndpoint=config.getInitParameter("singleSignOutEndpoint"); - log.debug(" init."); - } -} diff --git a/maxkey-client-sdk/src/main/resources/log4j.properties b/maxkey-client-sdk/src/main/resources/log4j.properties deleted file mode 100644 index d924d5179..000000000 --- a/maxkey-client-sdk/src/main/resources/log4j.properties +++ /dev/null @@ -1,40 +0,0 @@ -# General Log Settings -#log4j.rootLogger=INFO,LOGFILE,stdout -log4j.rootLogger=INFO,LOGFILE,stdout - -#appender config:stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%c:%p %X %L] %m%n -#log4j.appender.stdout.layout.ConversionPattern=%-d{HH:mm:ss.SSS} [%c:%p %X{$UserName$} %L] %m%n - -#appender config:LOGFILE -# log file arrcoss file size -log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender -#log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.LOGFILE.DatePattern=.yyyy-MM-dd -log4j.appender.LOGFILE.File=${catalina.home}/logs/maxkey_client_out.log -log4j.appender.LOGFILE.maxFileSize=2048KB -log4j.appender.LOGFILE.MaxBackupIndex = 5 - -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%c:%p] %m%n - -log4j.appender.DEBUG=org.apache.log4j.RollingFileAppender -log4j.appender.DEBUG.File=${catalina.home}/logs/maxkey_client_debug.log -log4j.appender.DEBUG.maxFileSize=2048KB -log4j.appender.DEBUG.MaxBackupIndex = 5 -log4j.appender.DEBUG.DatePattern=.yyyy-MM-dd -log4j.appender.DEBUG.layout=org.apache.log4j.PatternLayout -log4j.appender.DEBUG.layout.ConversionPattern=[%c:%p %X %L] %m%n - -#log4j.appender.ERROR=org.apache.log4j.DailyRollingFileAppender -#log4j.appender.ERROR.DatePattern=.yyyy-MM-dd -log4j.appender.ERROR=org.apache.log4j.RollingFileAppender -log4j.appender.ERROR.File=${catalina.home}/logs/maxkey_client_error.log - -log4j.appender.ERROR.maxFileSize=2048KB -log4j.appender.ERROR.MaxBackupIndex = 5 - -log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout -log4j.appender.ERROR.layout.ConversionPattern=[%c:%p %X %L] %m%n diff --git a/maxkey-client-sdk/src/main/resources/org/maxkey/client/utils/PathUtilsFile.properties b/maxkey-client-sdk/src/main/resources/org/maxkey/client/utils/PathUtilsFile.properties deleted file mode 100644 index 6a2b0ac42..000000000 --- a/maxkey-client-sdk/src/main/resources/org/maxkey/client/utils/PathUtilsFile.properties +++ /dev/null @@ -1 +0,0 @@ -v1.0.1 \ No newline at end of file diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxKey20Example.java b/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxKey20Example.java deleted file mode 100644 index f9bf63083..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxKey20Example.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.test; - -import java.util.*; - -import org.maxkey.client.http.HttpVerb; -import org.maxkey.client.http.Response; -import org.maxkey.client.oauth.builder.ServiceBuilder; -import org.maxkey.client.oauth.builder.api.MaxkeyApi20; -import org.maxkey.client.oauth.model.OAuthRequest; -import org.maxkey.client.oauth.model.Token; -import org.maxkey.client.oauth.model.Verifier; -import org.maxkey.client.oauth.oauth.OAuthService; - -public class MaxKey20Example -{ - private static final String NETWORK_NAME = "SinaWeibo"; - private static final String PROTECTED_RESOURCE_URL = "https://api.weibo.com/2/account/get_uid.json"; - private static final Token EMPTY_TOKEN = null; - - public static void main(String[] args) - { - // Replace these with your own api key and secret - String apiKey = "your_api_key"; - String apiSecret = "your_api_secret"; - OAuthService service = new ServiceBuilder() - .provider(MaxkeyApi20.class) - .apiKey(apiKey) - .apiSecret(apiSecret) - .callback("http://www.dajie.com/oauth/sina") - .build(); - Scanner in = new Scanner(System.in); - - System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ==="); - System.out.println(); - - // Obtain the Authorization URL - System.out.println("Fetching the Authorization URL..."); - String authorizationUrl = service.getAuthorizationUrl(EMPTY_TOKEN); - System.out.println("Got the Authorization URL!"); - System.out.println("Now go and authorize Scribe here:"); - System.out.println(authorizationUrl); - System.out.println("And paste the authorization code here"); - System.out.print(">>"); - Verifier verifier = new Verifier(in.nextLine()); - System.out.println(); - - // Trade the Request Token and Verifier for the Access Token - System.out.println("Trading the Request Token for an Access Token..."); - Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier); - System.out.println("Got the Access Token!"); - System.out.println("(if your curious it looks like this: " + accessToken + " )"); - System.out.println(); - - // Now let's go and ask for a protected resource! - System.out.println("Now we're going to access a protected resource..."); - OAuthRequest request = new OAuthRequest(HttpVerb.GET, PROTECTED_RESOURCE_URL); - service.signRequest(accessToken, request); - Response response = request.send(); - System.out.println("Got it! Lets see what we found..."); - System.out.println(); - System.out.println(response.getCode()); - System.out.println(response.getBody()); - - System.out.println(); - System.out.println("Thats it man! Go and build something awesome with Scribe! :)"); - - } -} diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxkeyPasswordDemo.java b/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxkeyPasswordDemo.java deleted file mode 100644 index 1ca8a94f6..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/MaxkeyPasswordDemo.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.oauth.test; - -import org.maxkey.client.http.Response; -import org.maxkey.client.oauth.builder.api.MaxkeyPasswordApi20; -import org.maxkey.client.oauth.model.OAuthConfig; -import org.maxkey.client.oauth.model.Token; -import org.maxkey.client.oauth.oauth.OAuthPasswordService; - -public class MaxkeyPasswordDemo { - - /** - * @param args - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - String accessTokenUrl="http://localhost:8080/opensec/oauth/v20/token"; - String clientId = "e6bfadbfc1d64d0e9140a716548c35db"; - String clientSerect = "e6bfadbfc1d64d0e9140a716548c35db"; - - String callback = "http://localhost:8080/oauth1demo/oauth20callback.jsp"; - String responseType ="token"; - String approvalprompt = "auto"; - OAuthConfig oauthServiceConfig=new OAuthConfig(clientId,clientSerect,callback); - - MaxkeyPasswordApi20 ConnsecPasswordApi20=new MaxkeyPasswordApi20(accessTokenUrl); - - OAuthPasswordService oAuthPasswordService=new OAuthPasswordService(oauthServiceConfig,ConnsecPasswordApi20); - Token accessToken = null; - Response response = null; - accessToken = oAuthPasswordService.getAccessToken("6ac07a3d-b935-43f2-a693-9ce49b6695b7", "1qaz2wsx"); - - } - - -} diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/package-info.java b/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/package-info.java deleted file mode 100644 index dd633e524..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/client/oauth/test/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -/** - * @author Administrator - * - */ -package org.maxkey.client.oauth.test; diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/URLTest.java b/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/URLTest.java deleted file mode 100644 index 42cc41532..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/URLTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.client.utils; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.net.URLEncoder; - -public class URLTest { - - /** - * @param args - * @throws UnsupportedEncodingException - */ - public static void main(String[] args) throws UnsupportedEncodingException { - // TODO Auto-generated method stub - //String encoderString="/bi/QvAJAXZfc/opendoc.htm?document=康缘药业经营决策分析 .qvw&host=QVS@bi-server51"; - - String encoderString="康缘药业经营决策分析 .qvw"; - encoderString=URLEncoder.encode(encoderString,"UTF-8"); - System.out.println(encoderString); - - String decoderString="/bi/QvAJAXZfc/opendoc.htm?document=%E5%BA%B7%E7%BC%98%E8%8D%AF%E4%B8%9A%E7%BB%8F%E8%90%A5%E5%86%B3%E7%AD%96%E5%88%86%E6%9E%90.qvw&host=QVS%40bi-server51"; - decoderString=URLDecoder.decode(decoderString,"UTF-8"); - System.out.println(decoderString); - - } - -} diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/package-info.java b/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/package-info.java deleted file mode 100644 index d7d379089..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/client/utils/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -/** - * - */ -/** - * @author Administrator - * - */ -package org.maxkey.client.utils; diff --git a/maxkey-client-sdk/src/test/java/org/maxkey/rest/RestClientTest.java b/maxkey-client-sdk/src/test/java/org/maxkey/rest/RestClientTest.java deleted file mode 100644 index d81188335..000000000 --- a/maxkey-client-sdk/src/test/java/org/maxkey/rest/RestClientTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.rest; - -import java.util.HashMap; - -import org.junit.Test; -import org.maxkey.client.oauth.OAuthClient; -import org.maxkey.client.oauth.model.Token; -import org.maxkey.client.utils.JsonUtils; - - -public class RestClientTest { - - //@Test - public void main() { - - - OAuthClient tokenRestClient=new OAuthClient("https://exmail.qq.com/cgi-bin/token"); - tokenRestClient.addParameter("grant_type", "client_credentials"); - tokenRestClient.addBasicAuthorization("maxkey", "66199e4c36b6dfcfb6f1ebceda789432"); - Token token =tokenRestClient.requestAccessToken(); - System.out.println(token); - - OAuthClient authkeyRestClient=new OAuthClient("http://openapi.exmail.qq.com:12211/openapi/mail/authkey"); - authkeyRestClient.addBearerAuthorization(token.getAccess_token()); - authkeyRestClient.addParameter("Alias", "test@maxkey.org"); - - - HashMap authKey=JsonUtils.gson2Object(authkeyRestClient.execute().getBody(), HashMap.class); - - String login_url="https://exmail.qq.com/cgi-bin/login?fun=bizopenssologin&method=bizauth&agent=%s&user=%s&ticket=%s"; - System.out.println(String.format(login_url, "connsec","test@maxkey.org",authKey.get("auth_key"))); - //https://exmail.qq.com/cgi-bin/login?fun=bizopenssologin&method=bizauth&agent=connsec&user=test@connsec.com&ticket=25640C491CA4A056BD1A936C6AA4ABBCAB13AE76EB80E6C3A9259F5E8BFD91D7EA05D10DA3FB18F9BFB445D104CB58A0B4CDE97D9F219F3C - } -} diff --git a/maxkey-connectors/.classpath b/maxkey-connectors/.classpath deleted file mode 100644 index eb19361b5..000000000 --- a/maxkey-connectors/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/.project b/maxkey-connectors/.project deleted file mode 100644 index a5cb9f4f0..000000000 --- a/maxkey-connectors/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - maxkey-connectors - Project maxkey-connectors created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.classpath b/maxkey-connectors/maxkey-connector-activedirectory/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.project b/maxkey-connectors/maxkey-connector-activedirectory/.project deleted file mode 100644 index 4e5ff56cb..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-activedirectory - Project maxkey-connectors-activedirectory created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.core.prefs b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8f838df8f..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.launching.prefs b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index f8a131b56..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 2972a0e7e..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-activedirectory/build.gradle b/maxkey-connectors/maxkey-connector-activedirectory/build.gradle deleted file mode 100644 index 3c87c5618..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-activedirectory" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/ActivedirectoryConsumerApplication.java b/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/ActivedirectoryConsumerApplication.java deleted file mode 100644 index f6468414b..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/ActivedirectoryConsumerApplication.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.ActiveDirectoryUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.activedirectory" - }) -public class ActivedirectoryConsumerApplication { - - public static void main(String[] args) { - ConfigurableApplicationContext context = SpringApplication.run(ActivedirectoryConsumerApplication.class, args); - - } - - //@Bean(name = "activeDirectoryUtils") - public ActiveDirectoryUtils getLdapConnection( - @Value("${config.connector.activedirectory.providerUrl}") String providerUrl, - @Value("${config.connector.activedirectory.principal}") String principal, - @Value("${config.connector.activedirectory.credentials}") String credentials, - @Value("${config.connector.activedirectory.baseDN}") String baseDn, - @Value("${config.connector.activedirectory.domain}") String domain, - @Value("${config.connector.activedirectory.trustStore}") String trustStore, - @Value("${config.connector.activedirectory.trustStore.password}") String trustStorePassword - )throws Exception{ - ActiveDirectoryUtils ldapUtils=new ActiveDirectoryUtils( - providerUrl, - principal, - credentials, - baseDn, - domain); - - ldapUtils.setTrustStore(trustStore); - ldapUtils.setTrustStorePassword(trustStorePassword); - ldapUtils.setSsl(true); - - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - -} diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Group2Activedirectory.java b/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Group2Activedirectory.java deleted file mode 100644 index 56ca7bf03..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Group2Activedirectory.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.activedirectory; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.ActiveDirectoryUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Activedirectory extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Activedirectory.class); - - ActiveDirectoryUtils ldapUtils; - - public Group2Activedirectory() { - // TODO Auto-generated constructor stub - } - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - Attribute objectClass = new BasicAttribute("objectClass"); - objectClass.add("top"); - objectClass.add("group"); - attributes.put(objectClass); - - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("member","CN=dummy,"+ldapUtils.getBaseDN())); - - String dn="cn="+group.getName()+",cn=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",cn=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - return create(group); - } - - - String uniqueMember=""; - SearchControls memberSearchControls = new SearchControls(); - logger.debug("user Search : "+"(sAMAccountName="+groupMember.getMemberName()+")"); - memberSearchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration memberResults = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+groupMember.getMemberName()+")", memberSearchControls); - if (memberResults == null || !memberResults.hasMore()) { - - }else{ - SearchResult memberSr = (SearchResult) memberResults.next(); - uniqueMember =memberSr.getNameInNamespace(); - logger.debug("uniqueMember : "+uniqueMember); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("member",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",cn=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - } - - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember=""; - SearchControls memberSearchControls = new SearchControls(); - memberSearchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration memberResults = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+groupMember.getMemberName()+")", memberSearchControls); - if (memberResults == null || !memberResults.hasMore()) { - - }else{ - SearchResult memberSr = (SearchResult) memberResults.next(); - uniqueMember =memberSr.getNameInNamespace(); - logger.debug("uniqueMember : "+uniqueMember); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("member",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",cn=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - -} diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Organization2Activedirectory.java b/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Organization2Activedirectory.java deleted file mode 100644 index 24ed0ef91..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Organization2Activedirectory.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.activedirectory; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.ActiveDirectoryUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Activedirectory extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Activedirectory.class); - - ActiveDirectoryUtils ldapUtils; - - public Organization2Activedirectory() { - // TODO Auto-generated constructor stub - } - - @Override - public boolean create(Organizations organization) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - } catch (NamingException e) { - e.printStackTrace(); - } - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - - //ModificationItem[] modificationItems = new ModificationItem[1]; - //modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Password2Activedirectory.java b/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Password2Activedirectory.java deleted file mode 100644 index 02c69ba62..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/Password2Activedirectory.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.activedirectory; - -import java.io.UnsupportedEncodingException; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.ActiveDirectoryUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "passwordConnector") -public class Password2Activedirectory extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Activedirectory.class); - ActiveDirectoryUtils ldapUtils; - /** - * userAccountControl鍊煎緱璇存槑 - * http://support.microsoft.com/zh-cn/kb/305144 - * 灞炴�ф爣蹇� 鍗佸叚杩涘埗鍊� 鍗佽繘鍒跺�� - SCRIPT 0x0001 1 - ACCOUNTDISABLE 0x0002 2 - HOMEDIR_REQUIRED 0x0008 8 - LOCKOUT 0x0010 16 - PASSWD_NOTREQD 0x0020 32 - PASSWD_CANT_CHANGE 0x0040 64 - ENCRYPTED_TEXT_PWD_ALLOWED 0x0080 128 - TEMP_DUPLICATE_ACCOUNT 0x0100 256 - NORMAL_ACCOUNT 0x0200 512 - INTERDOMAIN_TRUST_ACCOUNT 0x0800 2048 - WORKSTATION_TRUST_ACCOUNT 0x1000 4096 - SERVER_TRUST_ACCOUNT 0x2000 8192 - DONT_EXPIRE_PASSWORD 0x10000 65536 - MNS_LOGON_ACCOUNT 0x20000 131072 - SMARTCARD_REQUIRED 0x40000 262144 - TRUSTED_FOR_DELEGATION 0x80000 524288 - NOT_DELEGATED 0x100000 1048576 - USE_DES_KEY_ONLY 0x200000 2097152 - DONT_REQ_PREAUTH 0x400000 4194304 - PASSWORD_EXPIRED 0x800000 8388608 - TRUSTED_TO_AUTH_FOR_DELEGATION 0x1000000 16777216 - */ - public Password2Activedirectory() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - try { - String dn=null; - SearchControls searchControls = new SearchControls(); - searchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+userInfo.getUsername()+")", searchControls); - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ModificationItem[] modificationItems = new ModificationItem[1]; - logger.info("decipherable : "+userInfo.getDecipherable()); - String password=ReciprocalUtils.decoder(userInfo.getDecipherable()); - //modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",password)); - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("unicodePwd",("\"" + password + "\"").getBytes("UTF-16LE"))); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/UserInfo2Activedirectory.java b/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/UserInfo2Activedirectory.java deleted file mode 100644 index eb45d4548..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/java/org/maxkey/connector/activedirectory/UserInfo2Activedirectory.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.activedirectory; - -import java.io.UnsupportedEncodingException; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.ActiveDirectoryUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "userInfoConnector") -public class UserInfo2Activedirectory extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Activedirectory.class); - ActiveDirectoryUtils ldapUtils; - /** - * userAccountControl值得说明 - * http://support.microsoft.com/zh-cn/kb/305144 - * 属�?�标�? 十六进制�? 十进制�?? - SCRIPT 0x0001 1 - ACCOUNTDISABLE 0x0002 2 - HOMEDIR_REQUIRED 0x0008 8 - LOCKOUT 0x0010 16 - PASSWD_NOTREQD 0x0020 32 - PASSWD_CANT_CHANGE 0x0040 64 - ENCRYPTED_TEXT_PWD_ALLOWED 0x0080 128 - TEMP_DUPLICATE_ACCOUNT 0x0100 256 - NORMAL_ACCOUNT 0x0200 512 - INTERDOMAIN_TRUST_ACCOUNT 0x0800 2048 - WORKSTATION_TRUST_ACCOUNT 0x1000 4096 - SERVER_TRUST_ACCOUNT 0x2000 8192 - DONT_EXPIRE_PASSWORD 0x10000 65536 - MNS_LOGON_ACCOUNT 0x20000 131072 - SMARTCARD_REQUIRED 0x40000 262144 - TRUSTED_FOR_DELEGATION 0x80000 524288 - NOT_DELEGATED 0x100000 1048576 - USE_DES_KEY_ONLY 0x200000 2097152 - DONT_REQ_PREAUTH 0x400000 4194304 - PASSWORD_EXPIRED 0x800000 8388608 - TRUSTED_TO_AUTH_FOR_DELEGATION 0x1000000 16777216 - */ - public UserInfo2Activedirectory() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - try { - Attributes attributes = new BasicAttributes(); - Attribute objectClass = new BasicAttribute("objectClass"); - objectClass.add("top"); - objectClass.add("person"); - objectClass.add("organizationalPerson"); - objectClass.add("user"); - attributes.put(objectClass); - attributes.put(new BasicAttribute("sAMAccountName",userInfo.getUsername())); - logger.debug("decipherable : "+userInfo.getDecipherable()); - String password=ReciprocalUtils.decoder(userInfo.getDecipherable()); - - attributes.put(new BasicAttribute("unicodePwd",("\"" + password + "\"").getBytes("UTF-16LE"))); - //attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getUsername())); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"00000000000":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"email@default.com":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"0":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"default":userInfo.getDepartment())); - String managerDn="CN=dummy,"+ldapUtils.getBaseDN(); - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - logger.debug("manager is null."); - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - SearchControls managerSearchControls = new SearchControls(); - managerSearchControls.setSearchScope(ldapUtils.getSearchScope()); - logger.debug("managerResults : "+ldapUtils.getBaseDN()); - logger.debug("filter : "+"(sAMAccountName="+manager.getUsername()+")"); - logger.debug("managerSearchControls : "+managerSearchControls); - NamingEnumeration managerResults = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+manager.getUsername()+")", managerSearchControls); - if (managerResults == null || !managerResults.hasMore()) { - - }else{ - SearchResult managerSr = (SearchResult) managerResults.next(); - managerDn =managerSr.getNameInNamespace(); - } - } - - attributes.put(new BasicAttribute("manager",managerDn)); - - attributes.put(new BasicAttribute("department",userInfo.getDepartment()==null?"default":userInfo.getDepartment())); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"default":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"default":userInfo.getJobTitle())); - - //for kerberos login - attributes.put(new BasicAttribute("servicePrincipalName",this.properties.getProperty("servicePrincipalName"))); - attributes.put(new BasicAttribute("userPrincipalName",userInfo.getUsername()+"@"+this.properties.getProperty("domain"))); - - attributes.put(new BasicAttribute("userAccountControl",Integer.toString(66048))); - String rdn=""; - if(userInfo.getDepartmentId()!=null&& - !userInfo.getDepartmentId().equals("")){ - //get organization dn - SearchControls searchControls = new SearchControls(); - searchControls.setSearchScope(ldapUtils.getSearchScope()); - logger.debug("managerResults : "+ldapUtils.getBaseDN()); - logger.debug("filter : "+"(&(objectClass=organizationalUnit)(description="+userInfo.getDepartmentId()+"))"); - logger.debug("searchControls : "+searchControls); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+userInfo.getDepartmentId()+"))", searchControls); - - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - }else{ - rdn=ldapUtils.getBaseDN(); - } - - //String dn="CN="+userInfo.getDisplayName()+","+rdn; - String dn="CN="+userInfo.getUsername()+","+rdn; - - logger.debug("dn : "+dn); - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - try { - String dn=null; - SearchControls searchControls = new SearchControls(); - searchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+userInfo.getUsername()+")", searchControls); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - - ModificationItem[] modificationItems = new ModificationItem[8]; - //modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"00000000000":userInfo.getWorkPhoneNumber())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"email@default.com":userInfo.getWorkEmail())); - - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"default":userInfo.getEmployeeNumber())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"default":userInfo.getDepartment())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("department",userInfo.getDepartmentId()==null?"default":userInfo.getDepartment())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"default":userInfo.getDepartmentId())); - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"default":userInfo.getJobTitle())); - - String managerDn="CN=dummy,"+ldapUtils.getBaseDN(); - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - SearchControls managerSearchControls = new SearchControls(); - managerSearchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration managerResults = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+manager.getUsername()+")", managerSearchControls); - if (managerResults == null || !managerResults.hasMore()) { - - }else{ - SearchResult managerSr = (SearchResult) managerResults.next(); - managerDn =managerSr.getNameInNamespace(); - } - } - - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - - if(userInfo.getDepartmentId()!=null&& - !userInfo.getDepartmentId().equals("")){ - //get organization dn - SearchControls orgSearchControls = new SearchControls(); - orgSearchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration orgResults = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+userInfo.getDepartmentId()+"))", orgSearchControls); - String orgRdn=""; - if (orgResults == null || !orgResults.hasMore()) { - orgRdn=ldapUtils.getBaseDN(); - }else{ - SearchResult orgSearchResult = (SearchResult) orgResults.next(); - orgRdn =orgSearchResult.getNameInNamespace(); - } - - //String newDn="CN="+userInfo.getDisplayName()+","+orgRdn; - String newDn="CN="+userInfo.getUsername()+","+orgRdn; - - if(!dn.equals(newDn)){ - logger.debug("oldDn : "+dn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(dn, newDn); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - try { - String dn=null; - SearchControls searchControls = new SearchControls(); - searchControls.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(sAMAccountName="+userInfo.getUsername()+")", searchControls); - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - logger.debug("delete dn : "+dn); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties deleted file mode 100644 index 35fac8d5c..000000000 --- a/maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties +++ /dev/null @@ -1,48 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-ActiveDirectory -application.name=MaxKey-Connector-ActiveDirectory -application.formatted-version=v2.0.0 GA -#server port -server.port=9602 -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=ActiveDirectoryConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.activedirectory.providerUrl=ldap:// -config.connector.activedirectory.principal=maxkey -config.connector.activedirectory.credentials=maxkey -config.connector.activedirectory.baseDN=dc=maxkey,dc=top -config.connector.activedirectory.domain=MAXKEY -config.connector.activedirectory.trustStore=maxkey -config.connector.activedirectory.trustStore.password=maxkey \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-base/.classpath b/maxkey-connectors/maxkey-connector-base/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-base/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-base/.project b/maxkey-connectors/maxkey-connector-base/.project deleted file mode 100644 index 17871f197..000000000 --- a/maxkey-connectors/maxkey-connector-base/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-base - Project maxkey-connectors-base created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.core.prefs b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8f838df8f..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.launching.prefs b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index f8a131b56..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 9a5f7e0a8..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-base/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-base/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-base/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-base/build.gradle b/maxkey-connectors/maxkey-connector-base/build.gradle deleted file mode 100644 index d727ab605..000000000 --- a/maxkey-connectors/maxkey-connector-base/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -description = "maxkey-connector-base" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/AbstractConnector.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/AbstractConnector.java deleted file mode 100644 index b98d2ed2a..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/AbstractConnector.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import java.util.Properties; - -import org.springframework.jdbc.core.JdbcTemplate; - - -public abstract class AbstractConnector{ - - - public static class CONNECTOR_TYPE{ - public static int USERINFO_TYPE=1; - public static int ORG_TYPE=2; - public static int GROUP_TYPE=3; - public static int PASSWORD_TYPE=4; - } - - protected Properties properties; - - protected JdbcTemplate jdbcTemplate; - - public boolean create(T entity) throws Exception{ - return true; - } - - public boolean update(T entity) throws Exception{ - return true; - } - - public boolean delete(T entity) throws Exception{ - return true; - } - - public Properties getProperties() { - return properties; - } - - public void setProperties(Properties properties) { - this.properties = properties; - } - - public JdbcTemplate getJdbcTemplate() { - return jdbcTemplate; - } - - public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { - this.jdbcTemplate = jdbcTemplate; - } - - - - -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/GroupConnector.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/GroupConnector.java deleted file mode 100644 index 750fd60e5..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/GroupConnector.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; - -public abstract class GroupConnector extends AbstractConnector { - - @Override - public boolean create(Groups group) throws Exception{ - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - return true; - } - - @Override - public boolean delete(Groups group) throws Exception{ - return true; - } - - - public boolean addMember(GroupMember groupMember) throws Exception{ - return true; - } - - - public boolean deleteMember(GroupMember groupMember) throws Exception{ - return true; - } - -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/OrganizationConnector.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/OrganizationConnector.java deleted file mode 100644 index dae99e550..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/OrganizationConnector.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.domain.Organizations; - -public abstract class OrganizationConnector extends AbstractConnector { - - @Override - public boolean create(Organizations organization) throws Exception{ - return true; - } - - @Override - public boolean update(Organizations organization) throws Exception{ - return true; - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - return true; - } - -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/PasswordConnector.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/PasswordConnector.java deleted file mode 100644 index 11567f319..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/PasswordConnector.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.domain.UserInfo; - -public abstract class PasswordConnector extends AbstractConnector { - - public boolean sync(UserInfo userInfo) throws Exception{ - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/UserInfoConnector.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/UserInfoConnector.java deleted file mode 100644 index 3da3c7323..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/UserInfoConnector.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.domain.UserInfo; - -public abstract class UserInfoConnector extends AbstractConnector { - - @Override - public boolean create(UserInfo userInfo) throws Exception { - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - return true; - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaGroupsTopicReceiver.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaGroupsTopicReceiver.java deleted file mode 100644 index aeffbb2fc..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaGroupsTopicReceiver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.receiver; - -import java.util.Optional; - -import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.Groups; -import org.maxkey.identity.kafka.KafkaIdentityAction; -import org.maxkey.identity.kafka.KafkaIdentityTopic; -import org.maxkey.identity.kafka.KafkaMessage; -import org.maxkey.util.JsonUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.kafka.annotation.KafkaListener; -import org.springframework.stereotype.Component; - -@Component -public class KafkaGroupsTopicReceiver { - private static final Logger _logger = LoggerFactory.getLogger(KafkaGroupsTopicReceiver.class); - - @Autowired - GroupConnector groupConnector; - - @KafkaListener(topics = {KafkaIdentityTopic.GROUP_TOPIC}) - public void listen(ConsumerRecord record) { - try { - Optional kafkaMessage = Optional.ofNullable(record.value()); - - if (kafkaMessage.isPresent()) { - - Object message = kafkaMessage.get(); - - _logger.debug("----------------- record =" + record); - _logger.debug("------------------ message =" + message); - - KafkaMessage receiverMessage = JsonUtils.gson2Object(message.toString(), KafkaMessage.class); - Groups group = JsonUtils.gson2Object(receiverMessage.getContent().toString(),Groups.class); - - if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.CREATE_ACTION)) { - groupConnector.create(group); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.UPDATE_ACTION)) { - groupConnector.update(group); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.DELETE_ACTION)) { - groupConnector.delete(group); - }else{ - _logger.info("Other Action "); - } - } - }catch(Exception e) { - - } - - } -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaOrgsTopicReceiver.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaOrgsTopicReceiver.java deleted file mode 100644 index 596fc082e..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaOrgsTopicReceiver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.receiver; - -import java.util.Optional; - -import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.identity.kafka.KafkaIdentityAction; -import org.maxkey.identity.kafka.KafkaIdentityTopic; -import org.maxkey.identity.kafka.KafkaMessage; -import org.maxkey.util.JsonUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.kafka.annotation.KafkaListener; -import org.springframework.stereotype.Component; - -@Component -public class KafkaOrgsTopicReceiver { - private static final Logger _logger = LoggerFactory.getLogger(KafkaOrgsTopicReceiver.class); - - @Autowired - OrganizationConnector organizationConnector; - - @KafkaListener(topics = {KafkaIdentityTopic.ORG_TOPIC}) - public void listen(ConsumerRecord record) { - try { - Optional kafkaMessage = Optional.ofNullable(record.value()); - - if (kafkaMessage.isPresent()) { - - Object message = kafkaMessage.get(); - - _logger.debug("----------------- record =" + record); - _logger.debug("------------------ message =" + message); - - KafkaMessage receiverMessage = JsonUtils.gson2Object(message.toString(), KafkaMessage.class); - Organizations org = JsonUtils.gson2Object(receiverMessage.getContent().toString(),Organizations.class); - - if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.CREATE_ACTION)) { - organizationConnector.create(org); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.UPDATE_ACTION)) { - organizationConnector.update(org); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.DELETE_ACTION)) { - organizationConnector.delete(org); - }else{ - _logger.info("Other Action "); - } - } - }catch(Exception e) { - - } - - } -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaPasswordTopicReceiver.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaPasswordTopicReceiver.java deleted file mode 100644 index 0491044ef..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaPasswordTopicReceiver.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.receiver; - -import java.util.Optional; - -import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.maxkey.connector.PasswordConnector; -import org.maxkey.domain.UserInfo; -import org.maxkey.identity.kafka.KafkaIdentityAction; -import org.maxkey.identity.kafka.KafkaIdentityTopic; -import org.maxkey.identity.kafka.KafkaMessage; -import org.maxkey.util.JsonUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.kafka.annotation.KafkaListener; -import org.springframework.stereotype.Component; - -@Component -public class KafkaPasswordTopicReceiver { - private static final Logger _logger = LoggerFactory.getLogger(KafkaPasswordTopicReceiver.class); - - @Autowired - PasswordConnector passwordConnector; - - @KafkaListener(topics = {KafkaIdentityTopic.PASSWORD_TOPIC}) - public void listen(ConsumerRecord record) { - try { - Optional kafkaMessage = Optional.ofNullable(record.value()); - - if (kafkaMessage.isPresent()) { - - Object message = kafkaMessage.get(); - - _logger.debug("----------------- record =" + record); - _logger.debug("------------------ message =" + message); - - KafkaMessage receiverMessage = JsonUtils.gson2Object(message.toString(), KafkaMessage.class); - UserInfo userInfo = JsonUtils.gson2Object(receiverMessage.getContent().toString(),UserInfo.class); - - if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.PASSWORD_ACTION)) { - passwordConnector.update(userInfo); - }else{ - _logger.info("Other Action "); - } - } - }catch(Exception e) { - - } - } -} diff --git a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaUserInfoTopicReceiver.java b/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaUserInfoTopicReceiver.java deleted file mode 100644 index 733cd0d55..000000000 --- a/maxkey-connectors/maxkey-connector-base/src/main/java/org/maxkey/connector/receiver/KafkaUserInfoTopicReceiver.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.receiver; - -import java.util.Optional; - -import org.apache.kafka.clients.consumer.ConsumerRecord; -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.domain.UserInfo; -import org.maxkey.identity.kafka.KafkaIdentityAction; -import org.maxkey.identity.kafka.KafkaIdentityTopic; -import org.maxkey.identity.kafka.KafkaMessage; -import org.maxkey.util.JsonUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.kafka.annotation.KafkaListener; -import org.springframework.stereotype.Component; - -@Component -public class KafkaUserInfoTopicReceiver { - private static final Logger _logger = LoggerFactory.getLogger(KafkaUserInfoTopicReceiver.class); - - @Autowired - UserInfoConnector userInfoConnector; - - @KafkaListener(topics = {KafkaIdentityTopic.USERINFO_TOPIC}) - public void listen(ConsumerRecord record) { - try { - Optional kafkaMessage = Optional.ofNullable(record.value()); - - if (kafkaMessage.isPresent()) { - - Object message = kafkaMessage.get(); - - _logger.debug("----------------- record =" + record); - _logger.debug("------------------ message =" + message); - - KafkaMessage receiverMessage = JsonUtils.gson2Object(message.toString(), KafkaMessage.class); - UserInfo userInfo = JsonUtils.gson2Object(receiverMessage.getContent().toString(),UserInfo.class); - - if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.CREATE_ACTION)) { - userInfoConnector.create(userInfo); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.UPDATE_ACTION)) { - userInfoConnector.update(userInfo); - }else if(receiverMessage.getActionType().equalsIgnoreCase(KafkaIdentityAction.DELETE_ACTION)) { - userInfoConnector.delete(userInfo); - }else{ - _logger.info("Other Action "); - } - } - }catch(Exception e) { - - } - - } -} diff --git a/maxkey-connectors/maxkey-connector-dingding/.classpath b/maxkey-connectors/maxkey-connector-dingding/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-dingding/.project b/maxkey-connectors/maxkey-connector-dingding/.project deleted file mode 100644 index 18d33e7b1..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-dingding - Project maxkey-connector-dingding created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 538fc0077..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-dingding/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-dingding/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-dingding/build.gradle b/maxkey-connectors/maxkey-connector-dingding/build.gradle deleted file mode 100644 index ea3de9070..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-dingding" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/DingdingConsumerApplication.java b/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/DingdingConsumerApplication.java deleted file mode 100644 index ed8512c9c..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/DingdingConsumerApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.LdapUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.dingding" - }) -public class DingdingConsumerApplication { - - public static void main(String[] args) { - // TODO Auto-generated method stub - ConfigurableApplicationContext context = SpringApplication.run(DingdingConsumerApplication.class, args); - - } - - //@Bean(name = "ldapUtils") - public LdapUtils getLdapConnection( - @Value("${config.connector.ldap.providerUrl}") String providerUrl, - @Value("${config.connector.ldap.principal}") String principal, - @Value("${config.connector.ldap.credentials}") String credentials, - @Value("${config.connector.ldap.baseDN}") String baseDn - )throws Exception{ - - LdapUtils ldapUtils=new LdapUtils( - providerUrl, - principal, - credentials, - baseDn); - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - - - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(DingdingConsumerApplication.class); - } - -} diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Group2Dingding.java b/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Group2Dingding.java deleted file mode 100644 index e9406b2b2..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Group2Dingding.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.dingding; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Dingding extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Dingding.class); - - LdapUtils ldapUtils; - public Group2Dingding() { - - } - - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","groupOfUniqueNames")); - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("uniqueMember","uid=dummy")); - - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - create(group); - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Organization2Dingding.java b/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Organization2Dingding.java deleted file mode 100644 index c4308de0f..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Organization2Dingding.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.dingding; - -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Dingding extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Dingding.class); - - LdapUtils ldapUtils; - public Organization2Dingding() { - - } - - @Override - public boolean create(Organizations organization) throws Exception { - logger.info("create"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - logger.info("update"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("id",organization.getId())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgname",organization.getpName())); - //modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgid",organization.getpId())); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - logger.info("delete"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Password2Dingding.java b/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Password2Dingding.java deleted file mode 100644 index 4d1500efd..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/Password2Dingding.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.dingding; - -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - - -@Component(value = "passwordConnector") -public class Password2Dingding extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Dingding.class); - - LdapUtils ldapUtils; - - public Password2Dingding() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - logger.info("changePassword"); - try { - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/UserInfo2Dingding.java b/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/UserInfo2Dingding.java deleted file mode 100644 index 1f0a68d33..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/java/org/maxkey/connector/dingding/UserInfo2Dingding.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.dingding; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -@Component(value = "userInfoConnector") -public class UserInfo2Dingding extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Dingding.class); - - LdapUtils ldapUtils; - - public UserInfo2Dingding() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","inetOrgPerson")); - attributes.put(new BasicAttribute("uid",userInfo.getUsername())); - attributes.put(new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - attributes.put(new BasicAttribute("manager",managerDn)); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=inetOrgPerson)(uid="+userInfo.getUsername()+"))", constraints); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - ModificationItem[] modificationItems = new ModificationItem[10]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - modificationItems[8]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - logger.info("delete"); - try { - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } -} diff --git a/maxkey-connectors/maxkey-connector-dingding/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-dingding/src/main/resources/application.properties deleted file mode 100644 index 063611c9a..000000000 --- a/maxkey-connectors/maxkey-connector-dingding/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-LDAP -application.name=MaxKey-Connector-LDAP -application.formatted-version=v2.0.0 GA - -#server port -server.port=9601 - -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=LdapConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.ldap.providerUrl=ldap:// -config.connector.ldap.principal=maxkey -config.connector.ldap.credentials=maxkey -config.connector.ldap.baseDN=dc=maxkey,dc=top \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-feishu/.classpath b/maxkey-connectors/maxkey-connector-feishu/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-feishu/.project b/maxkey-connectors/maxkey-connector-feishu/.project deleted file mode 100644 index c6c026363..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-feishu - Project maxkey-connector-feishu created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 2fe9998c7..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-feishu/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-feishu/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-feishu/build.gradle b/maxkey-connectors/maxkey-connector-feishu/build.gradle deleted file mode 100644 index 280b117ab..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-feishu" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/FeishuConsumerApplication.java b/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/FeishuConsumerApplication.java deleted file mode 100644 index 3a761748e..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/FeishuConsumerApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.LdapUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.feishu" - }) -public class FeishuConsumerApplication { - - public static void main(String[] args) { - // TODO Auto-generated method stub - ConfigurableApplicationContext context = SpringApplication.run(FeishuConsumerApplication.class, args); - - } - - //@Bean(name = "ldapUtils") - public LdapUtils getLdapConnection( - @Value("${config.connector.ldap.providerUrl}") String providerUrl, - @Value("${config.connector.ldap.principal}") String principal, - @Value("${config.connector.ldap.credentials}") String credentials, - @Value("${config.connector.ldap.baseDN}") String baseDn - )throws Exception{ - - LdapUtils ldapUtils=new LdapUtils( - providerUrl, - principal, - credentials, - baseDn); - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - - - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(FeishuConsumerApplication.class); - } - -} diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Group2Feishu.java b/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Group2Feishu.java deleted file mode 100644 index 10dfadd87..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Group2Feishu.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.feishu; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Feishu extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Feishu.class); - - LdapUtils ldapUtils; - public Group2Feishu() { - - } - - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","groupOfUniqueNames")); - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("uniqueMember","uid=dummy")); - - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - create(group); - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Organization2Feishu.java b/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Organization2Feishu.java deleted file mode 100644 index dd3964dc1..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Organization2Feishu.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.feishu; - -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Feishu extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Feishu.class); - - LdapUtils ldapUtils; - public Organization2Feishu() { - - } - - @Override - public boolean create(Organizations organization) throws Exception { - logger.info("create"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - logger.info("update"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("id",organization.getId())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgname",organization.getpName())); - //modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgid",organization.getpId())); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - logger.info("delete"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Password2Feishu.java b/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Password2Feishu.java deleted file mode 100644 index f4e2455fc..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/Password2Feishu.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.feishu; - -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - - -@Component(value = "passwordConnector") -public class Password2Feishu extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Feishu.class); - - LdapUtils ldapUtils; - - public Password2Feishu() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - logger.info("changePassword"); - try { - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/UserInfo2Feishu.java b/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/UserInfo2Feishu.java deleted file mode 100644 index e4aa3d660..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/java/org/maxkey/connector/feishu/UserInfo2Feishu.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.feishu; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -@Component(value = "userInfoConnector") -public class UserInfo2Feishu extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Feishu.class); - - LdapUtils ldapUtils; - - public UserInfo2Feishu() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","inetOrgPerson")); - attributes.put(new BasicAttribute("uid",userInfo.getUsername())); - attributes.put(new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - attributes.put(new BasicAttribute("manager",managerDn)); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=inetOrgPerson)(uid="+userInfo.getUsername()+"))", constraints); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - ModificationItem[] modificationItems = new ModificationItem[10]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - modificationItems[8]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - logger.info("delete"); - try { - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } -} diff --git a/maxkey-connectors/maxkey-connector-feishu/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-feishu/src/main/resources/application.properties deleted file mode 100644 index 063611c9a..000000000 --- a/maxkey-connectors/maxkey-connector-feishu/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-LDAP -application.name=MaxKey-Connector-LDAP -application.formatted-version=v2.0.0 GA - -#server port -server.port=9601 - -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=LdapConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.ldap.providerUrl=ldap:// -config.connector.ldap.principal=maxkey -config.connector.ldap.credentials=maxkey -config.connector.ldap.baseDN=dc=maxkey,dc=top \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-ldap/.classpath b/maxkey-connectors/maxkey-connector-ldap/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-ldap/.project b/maxkey-connectors/maxkey-connector-ldap/.project deleted file mode 100644 index dadcf381a..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-ldap - Project maxkey-connectors-ldap created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.core.prefs b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8f838df8f..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.launching.prefs b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index f8a131b56..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 9169e826c..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-ldap/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-ldap/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-ldap/build.gradle b/maxkey-connectors/maxkey-connector-ldap/build.gradle deleted file mode 100644 index 9952b29b6..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-ldap" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/LdapConsumerApplication.java b/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/LdapConsumerApplication.java deleted file mode 100644 index 8aff5d437..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/LdapConsumerApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.LdapUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.ldap" - }) -public class LdapConsumerApplication { - - public static void main(String[] args) { - // TODO Auto-generated method stub - ConfigurableApplicationContext context = SpringApplication.run(LdapConsumerApplication.class, args); - - } - - //@Bean(name = "ldapUtils") - public LdapUtils getLdapConnection( - @Value("${config.connector.ldap.providerUrl}") String providerUrl, - @Value("${config.connector.ldap.principal}") String principal, - @Value("${config.connector.ldap.credentials}") String credentials, - @Value("${config.connector.ldap.baseDN}") String baseDn - )throws Exception{ - - LdapUtils ldapUtils=new LdapUtils( - providerUrl, - principal, - credentials, - baseDn); - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - - - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(LdapConsumerApplication.class); - } - -} diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Group2Ldap.java b/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Group2Ldap.java deleted file mode 100644 index c3c4663e0..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Group2Ldap.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.ldap; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Ldap extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Ldap.class); - - LdapUtils ldapUtils; - public Group2Ldap() { - - } - - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","groupOfUniqueNames")); - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("uniqueMember","uid=dummy")); - - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - create(group); - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Organization2Ldap.java b/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Organization2Ldap.java deleted file mode 100644 index 549a9d537..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Organization2Ldap.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.ldap; - -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Ldap extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Ldap.class); - - LdapUtils ldapUtils; - public Organization2Ldap() { - - } - - @Override - public boolean create(Organizations organization) throws Exception { - logger.info("create"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - logger.info("update"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("id",organization.getId())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgname",organization.getpName())); - //modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgid",organization.getpId())); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - logger.info("delete"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Password2Ldap.java b/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Password2Ldap.java deleted file mode 100644 index 213cb62d6..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/Password2Ldap.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.ldap; - -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - - -@Component(value = "passwordConnector") -public class Password2Ldap extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Ldap.class); - - LdapUtils ldapUtils; - - public Password2Ldap() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - logger.info("changePassword"); - try { - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/UserInfo2Ldap.java b/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/UserInfo2Ldap.java deleted file mode 100644 index 755d679a2..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/java/org/maxkey/connector/ldap/UserInfo2Ldap.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.ldap; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -@Component(value = "userInfoConnector") -public class UserInfo2Ldap extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Ldap.class); - - LdapUtils ldapUtils; - - public UserInfo2Ldap() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","inetOrgPerson")); - attributes.put(new BasicAttribute("uid",userInfo.getUsername())); - attributes.put(new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - attributes.put(new BasicAttribute("manager",managerDn)); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=inetOrgPerson)(uid="+userInfo.getUsername()+"))", constraints); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - ModificationItem[] modificationItems = new ModificationItem[10]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - modificationItems[8]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - logger.info("delete"); - try { - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } -} diff --git a/maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties deleted file mode 100644 index 063611c9a..000000000 --- a/maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-LDAP -application.name=MaxKey-Connector-LDAP -application.formatted-version=v2.0.0 GA - -#server port -server.port=9601 - -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=LdapConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.ldap.providerUrl=ldap:// -config.connector.ldap.principal=maxkey -config.connector.ldap.credentials=maxkey -config.connector.ldap.baseDN=dc=maxkey,dc=top \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-welink/.classpath b/maxkey-connectors/maxkey-connector-welink/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-welink/.project b/maxkey-connectors/maxkey-connector-welink/.project deleted file mode 100644 index e9d44fba1..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-welink - Project maxkey-connector-welink created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.component deleted file mode 100644 index b1c083a0c..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-welink/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-welink/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-welink/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-welink/build.gradle b/maxkey-connectors/maxkey-connector-welink/build.gradle deleted file mode 100644 index 01a914bbf..000000000 --- a/maxkey-connectors/maxkey-connector-welink/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-welink" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/WelinkConsumerApplication.java b/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/WelinkConsumerApplication.java deleted file mode 100644 index 271aa69d1..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/WelinkConsumerApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.LdapUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.welink" - }) -public class WelinkConsumerApplication { - - public static void main(String[] args) { - // TODO Auto-generated method stub - ConfigurableApplicationContext context = SpringApplication.run(WelinkConsumerApplication.class, args); - - } - - //@Bean(name = "ldapUtils") - public LdapUtils getLdapConnection( - @Value("${config.connector.ldap.providerUrl}") String providerUrl, - @Value("${config.connector.ldap.principal}") String principal, - @Value("${config.connector.ldap.credentials}") String credentials, - @Value("${config.connector.ldap.baseDN}") String baseDn - )throws Exception{ - - LdapUtils ldapUtils=new LdapUtils( - providerUrl, - principal, - credentials, - baseDn); - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - - - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(WelinkConsumerApplication.class); - } - -} diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Group2Welink.java b/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Group2Welink.java deleted file mode 100644 index e4ea5c4d3..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Group2Welink.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.welink; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Welink extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Welink.class); - - LdapUtils ldapUtils; - public Group2Welink() { - - } - - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","groupOfUniqueNames")); - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("uniqueMember","uid=dummy")); - - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - create(group); - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Organization2Welink.java b/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Organization2Welink.java deleted file mode 100644 index 0e2faa2e5..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Organization2Welink.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.welink; - -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Welink extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Welink.class); - - LdapUtils ldapUtils; - public Organization2Welink() { - - } - - @Override - public boolean create(Organizations organization) throws Exception { - logger.info("create"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - logger.info("update"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("id",organization.getId())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgname",organization.getpName())); - //modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgid",organization.getpId())); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - logger.info("delete"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Password2Welink.java b/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Password2Welink.java deleted file mode 100644 index 56921ba4d..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/Password2Welink.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.welink; - -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - - -@Component(value = "passwordConnector") -public class Password2Welink extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Welink.class); - - LdapUtils ldapUtils; - - public Password2Welink() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - logger.info("changePassword"); - try { - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/UserInfo2Welink.java b/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/UserInfo2Welink.java deleted file mode 100644 index fd7c45e18..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/java/org/maxkey/connector/welink/UserInfo2Welink.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.welink; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -@Component(value = "userInfoConnector") -public class UserInfo2Welink extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Welink.class); - - LdapUtils ldapUtils; - - public UserInfo2Welink() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","inetOrgPerson")); - attributes.put(new BasicAttribute("uid",userInfo.getUsername())); - attributes.put(new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - attributes.put(new BasicAttribute("manager",managerDn)); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=inetOrgPerson)(uid="+userInfo.getUsername()+"))", constraints); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - ModificationItem[] modificationItems = new ModificationItem[10]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - modificationItems[8]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - logger.info("delete"); - try { - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } -} diff --git a/maxkey-connectors/maxkey-connector-welink/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-welink/src/main/resources/application.properties deleted file mode 100644 index 063611c9a..000000000 --- a/maxkey-connectors/maxkey-connector-welink/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-LDAP -application.name=MaxKey-Connector-LDAP -application.formatted-version=v2.0.0 GA - -#server port -server.port=9601 - -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=LdapConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.ldap.providerUrl=ldap:// -config.connector.ldap.principal=maxkey -config.connector.ldap.credentials=maxkey -config.connector.ldap.baseDN=dc=maxkey,dc=top \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-workweixin/.classpath b/maxkey-connectors/maxkey-connector-workweixin/.classpath deleted file mode 100644 index eca1d9e92..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maxkey-connectors/maxkey-connector-workweixin/.project b/maxkey-connectors/maxkey-connector-workweixin/.project deleted file mode 100644 index ca57ab9ba..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.project +++ /dev/null @@ -1,41 +0,0 @@ - - - maxkey-connector-workweixin - Project maxkey-connector-workweixin created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - org.springframework.ide.eclipse.boot.validation.springbootbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.buildship.core.prefs b/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 62e3e7e80..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir=../.. -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.core.resources.prefs b/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 896a9a53a..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.component b/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 5a0ce0b47..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - diff --git a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.project.facet.core.xml b/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 509bad92c..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.springframework.ide.eclipse.prefs b/maxkey-connectors/maxkey-connector-workweixin/.settings/org.springframework.ide.eclipse.prefs deleted file mode 100644 index a12794d68..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/.settings/org.springframework.ide.eclipse.prefs +++ /dev/null @@ -1,2 +0,0 @@ -boot.validation.initialized=true -eclipse.preferences.version=1 diff --git a/maxkey-connectors/maxkey-connector-workweixin/build.gradle b/maxkey-connectors/maxkey-connector-workweixin/build.gradle deleted file mode 100644 index d2579edf5..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = "maxkey-connector-workweixin" - -apply plugin: 'java' -apply plugin: 'eclipse-wtp' - - -dependencies { - //local jars - compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar') - - compile project(":maxkey-core") - compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") - compile project(":maxkey-connectors:maxkey-connector-base") - compile project(":maxkey-identitys:maxkey-identity-kafka") - -} \ No newline at end of file diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/WeixinConsumerApplication.java b/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/WeixinConsumerApplication.java deleted file mode 100644 index 021e045bf..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/WeixinConsumerApplication.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector; - -import org.maxkey.constants.ConstantsProperties; -import org.maxkey.persistence.ldap.LdapUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -@Configuration -@PropertySource(ConstantsProperties.applicationPropertySource) -@SpringBootApplication -@ComponentScan(basePackages = { - "org.maxkey.connector", - "org.maxkey.connector.receiver", - "org.maxkey.connector.workweixin" - }) -public class WeixinConsumerApplication { - - public static void main(String[] args) { - // TODO Auto-generated method stub - ConfigurableApplicationContext context = SpringApplication.run(WeixinConsumerApplication.class, args); - - } - - //@Bean(name = "ldapUtils") - public LdapUtils getLdapConnection( - @Value("${config.connector.ldap.providerUrl}") String providerUrl, - @Value("${config.connector.ldap.principal}") String principal, - @Value("${config.connector.ldap.credentials}") String credentials, - @Value("${config.connector.ldap.baseDN}") String baseDn - )throws Exception{ - - LdapUtils ldapUtils=new LdapUtils( - providerUrl, - principal, - credentials, - baseDn); - if(ldapUtils.openConnection()==null){ - throw new Exception("connection to Ldap Error."); - } - return ldapUtils; - } - - - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(WeixinConsumerApplication.class); - } - -} diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Group2Weixin.java b/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Group2Weixin.java deleted file mode 100644 index 9a50cc99d..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Group2Weixin.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.workweixin; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.GroupConnector; -import org.maxkey.domain.GroupMember; -import org.maxkey.domain.Groups; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "groupConnector") -public class Group2Weixin extends GroupConnector { - private final static Logger logger = LoggerFactory.getLogger(Group2Weixin.class); - - LdapUtils ldapUtils; - public Group2Weixin() { - - } - - @Override - public boolean create(Groups group) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","groupOfUniqueNames")); - attributes.put(new BasicAttribute("cn",group.getName())); - attributes.put(new BasicAttribute("uniqueMember","uid=dummy")); - - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(Groups group) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+group.getName()+")", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(group); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(","), oldDn.length()); - - String groupName=dnSplit[0].split("=")[1]; - if(group.getName()!=groupName){ - String newDn="cn="+group.getName()+","+rdn; - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("cn",groupName)); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean delete(Groups group) throws Exception { - logger.info("delete"); - try { - String dn="cn="+group.getName()+",dc=groups,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean addMember(GroupMember groupMember) throws Exception { - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - Groups group =new Groups(); - group.setName(groupMember.getGroupName()); - create(group); - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.ADD_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean deleteMember(GroupMember groupMember) throws Exception{ - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(cn="+groupMember.getGroupName()+")", constraints); - if (results == null || !results.hasMore()) { - return true; - } - - String uniqueMember="uid="+groupMember.getMemberName()+",dc=users,"+ldapUtils.getBaseDN(); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("uniqueMember",uniqueMember)); - - String dn="cn="+groupMember.getGroupName()+",dc=groups,"+ldapUtils.getBaseDN(); - logger.debug("dn : "+dn); - logger.debug("uniqueMember : "+uniqueMember); - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - - -} diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Organization2Weixin.java b/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Organization2Weixin.java deleted file mode 100644 index 4e29e8d58..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Organization2Weixin.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.workweixin; - -import javax.naming.NamingEnumeration; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.OrganizationConnector; -import org.maxkey.domain.Organizations; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -@Component(value = "organizationConnector") -public class Organization2Weixin extends OrganizationConnector{ - private final static Logger logger = LoggerFactory.getLogger(Organization2Weixin.class); - - LdapUtils ldapUtils; - public Organization2Weixin() { - - } - - @Override - public boolean create(Organizations organization) throws Exception { - logger.info("create"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getParentId()+"))", constraints); - String rdn=""; - if (results == null || !results.hasMore()) { - rdn=ldapUtils.getBaseDN(); - }else{ - SearchResult sr = (SearchResult) results.next(); - rdn =sr.getNameInNamespace(); - } - - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","organizationalUnit")); - attributes.put(new BasicAttribute("ou",organization.getName())); - //attributes.put(new BasicAttribute("name",organization.getName())); - //attributes.put(new BasicAttribute("id",organization.getId())); - //attributes.put(new BasicAttribute("porgname",organization.getpName())); - //attributes.put(new BasicAttribute("porgid",organization.getpId())); - attributes.put(new BasicAttribute("description",organization.getId())); - - String dn="ou="+organization.getName()+","+rdn; - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - - return super.create(organization); - } - - @Override - public boolean update(Organizations organization) throws Exception{ - logger.info("update"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String oldDn=""; - String rdn=""; - if (results == null || !results.hasMore()) { - return create(organization); - }else{ - SearchResult sr = (SearchResult) results.next(); - oldDn =sr.getNameInNamespace(); - String[] dnSplit=oldDn.split(","); - rdn=oldDn.substring(oldDn.indexOf(",")+1, oldDn.length()); - - String ouName=dnSplit[0].split("=")[1]; - if(organization.getName()!=ouName){ - String newDn="ou="+organization.getName()+","+rdn; - logger.debug("oldDn : "+oldDn); - logger.debug("newDn : "+newDn); - ldapUtils.getCtx().rename(oldDn, newDn); - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REMOVE_ATTRIBUTE,new BasicAttribute("ou",ouName)); - //modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("name",organization.getName())); - //modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("id",organization.getId())); - //modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgname",organization.getpName())); - //modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("porgid",organization.getpId())); - ldapUtils.getCtx().modifyAttributes(newDn, modificationItems); - } - } - - ldapUtils.close(); - - return super.update(organization); - } - - @Override - public boolean delete(Organizations organization) throws Exception{ - logger.info("delete"); - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=organizationalUnit)(description="+organization.getId()+"))", constraints); - String dn=""; - if (results == null || !results.hasMore()) { - - }else{ - SearchResult sr = (SearchResult) results.next(); - dn =sr.getNameInNamespace(); - ldapUtils.getCtx().destroySubcontext(dn); - } - - ldapUtils.close(); - - return super.delete(organization); - } - -} diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Password2Weixin.java b/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Password2Weixin.java deleted file mode 100644 index da633b329..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/Password2Weixin.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.workweixin; - -import javax.naming.NamingException; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - -import org.maxkey.connector.PasswordConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - - -@Component(value = "passwordConnector") -public class Password2Weixin extends PasswordConnector{ - private final static Logger logger = LoggerFactory.getLogger(Password2Weixin.class); - - LdapUtils ldapUtils; - - public Password2Weixin() { - - } - - @Override - public boolean sync(UserInfo userInfo) throws Exception{ - logger.info("changePassword"); - try { - ModificationItem[] modificationItems = new ModificationItem[1]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - -} diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/UserInfo2Weixin.java b/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/UserInfo2Weixin.java deleted file mode 100644 index a83c2e891..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/java/org/maxkey/connector/workweixin/UserInfo2Weixin.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright [2020] [MaxKey of copyright http://www.maxkey.top] - * - * 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. - */ - - -package org.maxkey.connector.workweixin; - -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attributes; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.BasicAttributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import javax.naming.directory.SearchControls; -import javax.naming.directory.SearchResult; - -import org.maxkey.connector.UserInfoConnector; -import org.maxkey.crypto.ReciprocalUtils; -import org.maxkey.domain.UserInfo; -import org.maxkey.persistence.ldap.LdapUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -@Component(value = "userInfoConnector") -public class UserInfo2Weixin extends UserInfoConnector{ - private final static Logger logger = LoggerFactory.getLogger(UserInfo2Weixin.class); - - LdapUtils ldapUtils; - - public UserInfo2Weixin() { - - } - - @Override - public boolean create(UserInfo userInfo) throws Exception{ - logger.info("create"); - try { - Attributes attributes = new BasicAttributes(); - attributes.put(new BasicAttribute("objectClass","inetOrgPerson")); - attributes.put(new BasicAttribute("uid",userInfo.getUsername())); - attributes.put(new BasicAttribute("userPassword",ReciprocalUtils.decoder(userInfo.getDecipherable()))); - attributes.put(new BasicAttribute("displayName",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("cn",userInfo.getDisplayName())); - attributes.put(new BasicAttribute("givenName",userInfo.getGivenName())); - attributes.put(new BasicAttribute("sn",userInfo.getFamilyName())); - - attributes.put(new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - attributes.put(new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - attributes.put(new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - attributes.put(new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - attributes.put(new BasicAttribute("manager",managerDn)); - attributes.put(new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - attributes.put(new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().createSubcontext(dn, attributes); - ldapUtils.close(); - super.create(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - @Override - public boolean update(UserInfo userInfo) throws Exception{ - logger.info("update"); - try { - SearchControls constraints = new SearchControls(); - constraints.setSearchScope(ldapUtils.getSearchScope()); - NamingEnumeration results = ldapUtils.getConnection() - .search(ldapUtils.getBaseDN(), "(&(objectClass=inetOrgPerson)(uid="+userInfo.getUsername()+"))", constraints); - if (results == null || !results.hasMore()) { - return create(loadUser(userInfo)); - } - - ModificationItem[] modificationItems = new ModificationItem[10]; - modificationItems[0]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("displayName",userInfo.getDisplayName())); - modificationItems[1]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("cn",userInfo.getDisplayName())); - modificationItems[2]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("givenName",userInfo.getGivenName())); - modificationItems[3]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("sn",userInfo.getFamilyName())); - - modificationItems[4]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mobile",userInfo.getWorkPhoneNumber()==null?"":userInfo.getWorkPhoneNumber())); - modificationItems[5]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("mail",userInfo.getWorkEmail()==null?"":userInfo.getWorkEmail())); - - modificationItems[6]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("employeeNumber",userInfo.getEmployeeNumber()==null?"":userInfo.getEmployeeNumber())); - modificationItems[7]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("ou",userInfo.getDepartment()==null?"":userInfo.getDepartment())); - modificationItems[8]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("departmentNumber",userInfo.getDepartmentId()==null?"":userInfo.getDepartmentId())); - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("title",userInfo.getJobTitle()==null?"":userInfo.getJobTitle())); - - String managerDn="uid=dummy"; - if(userInfo.getManagerId()==null||userInfo.getManagerId().equals("")){ - - }else{ - UserInfo queryManager=new UserInfo(); - queryManager.setId(userInfo.getManagerId()); - UserInfo manager=loadUser(queryManager); - managerDn="uid="+manager.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - } - modificationItems[9]=new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("manager",managerDn)); - - - - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - - ldapUtils.getCtx().modifyAttributes(dn, modificationItems); - ldapUtils.close(); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - - } - - @Override - public boolean delete(UserInfo userInfo) throws Exception{ - logger.info("delete"); - try { - String dn="uid="+userInfo.getUsername()+",dc=users,"+ldapUtils.getBaseDN(); - ldapUtils.getCtx().destroySubcontext(dn); - ldapUtils.close(); - super.delete(userInfo); - } catch (NamingException e) { - e.printStackTrace(); - } - return true; - } - - public UserInfo loadUser(UserInfo UserInfo) { - return null; - } -} diff --git a/maxkey-connectors/maxkey-connector-workweixin/src/main/resources/application.properties b/maxkey-connectors/maxkey-connector-workweixin/src/main/resources/application.properties deleted file mode 100644 index 063611c9a..000000000 --- a/maxkey-connectors/maxkey-connector-workweixin/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -#spring.profiles.active=dev -#application -application.title=MaxKey-Connector-LDAP -application.name=MaxKey-Connector-LDAP -application.formatted-version=v2.0.0 GA - -#server port -server.port=9601 - -#datasource -spring.datasource.username=root -spring.datasource.password=maxkey -spring.datasource.url=jdbc:mysql://localhost/maxkey?autoReconnect=true&characterEncoding=UTF-8 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource - -spring.kafka.bootstrap-servers=localhost:9092 -###########【初始化消费者配置】########### -# 默认的消费组ID -spring.kafka.consumer.properties.group.id=LdapConsumerGroup -# 是否自动提交offset -spring.kafka.consumer.enable-auto-commit=true -# 提交offset延时(接收到消息后多久提交offset) -spring.kafka.consumer.auto.commit.interval.ms=1000 -# 当kafka中没有初始offset或offset超出范围时将自动重置offset -# earliest:重置为分区中最小的offset; -# latest:重置为分区中最新的offset(消费分区中新产生的数据); -# none:只要有一个分区不存在已提交的offset,就抛出异常; -spring.kafka.consumer.auto-offset-reset=latest -# 消费会话超时时间(超过这个时间consumer没有发送心跳,就会触发rebalance操作) -spring.kafka.consumer.properties.session.timeout.ms=120000 -# 消费请求超时时间 -spring.kafka.consumer.properties.request.timeout.ms=180000 -# Kafka提供的序列化和反序列化类 -spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer -# 消费端监听的topic不存在时,项目启动会报错(关掉) -spring.kafka.listener.missing-topics-fatal=false -# 设置批量消费 -# spring.kafka.listener.type=batch -# 批量消费每次最多消费多少条消息 -# spring.kafka.consumer.max-poll-records=50 - -config.connector.ldap.providerUrl=ldap:// -config.connector.ldap.principal=maxkey -config.connector.ldap.credentials=maxkey -config.connector.ldap.baseDN=dc=maxkey,dc=top \ No newline at end of file diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpEncoder.java b/maxkey-core/src/main/java/org/maxkey/util/HttpEncoder.java similarity index 82% rename from maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpEncoder.java rename to maxkey-core/src/main/java/org/maxkey/util/HttpEncoder.java index 31bc34fde..d72ae7dfe 100644 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpEncoder.java +++ b/maxkey-core/src/main/java/org/maxkey/util/HttpEncoder.java @@ -15,15 +15,13 @@ */ -package org.maxkey.client.utils; +package org.maxkey.util; import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; -import org.maxkey.client.oauth.exceptions.*; - public abstract class HttpEncoder { private static final String CHARSET = "UTF-8"; @@ -37,13 +35,12 @@ public abstract class HttpEncoder { ENCODING_RULES = Collections.unmodifiableMap(rules); } - public static String encode(String plain) { - Preconditions.checkNotNull(plain, "Cannot encode null object"); + public static String encode(String plain) throws Exception { String encoded; try { encoded = URLEncoder.encode(plain, CHARSET); } catch (UnsupportedEncodingException uee) { - throw new OAuthException("Charset not found while encoding string: " + CHARSET, uee); + throw new Exception("Charset not found while encoding string: " + CHARSET, uee); } for (Map.Entry rule : ENCODING_RULES.entrySet()) { encoded = applyRule(encoded, rule.getKey(), rule.getValue()); @@ -56,8 +53,6 @@ public abstract class HttpEncoder { } public static String decode(String encoded) throws UnsupportedEncodingException { - Preconditions.checkNotNull(encoded, "Cannot decode null object"); - return URLDecoder.decode(encoded, CHARSET); } diff --git a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpsTrusts.java b/maxkey-core/src/main/java/org/maxkey/util/HttpsTrusts.java similarity index 98% rename from maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpsTrusts.java rename to maxkey-core/src/main/java/org/maxkey/util/HttpsTrusts.java index 5065112c8..c6601baf4 100644 --- a/maxkey-client-sdk/src/main/java/org/maxkey/client/utils/HttpsTrusts.java +++ b/maxkey-core/src/main/java/org/maxkey/util/HttpsTrusts.java @@ -15,7 +15,7 @@ */ -package org.maxkey.client.utils; +package org.maxkey.util; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; diff --git a/maxkey-identitys/maxkey-identity-rest/.settings/org.eclipse.wst.common.component b/maxkey-identitys/maxkey-identity-rest/.settings/org.eclipse.wst.common.component index ece70642c..8d35ad2cc 100644 --- a/maxkey-identitys/maxkey-identity-rest/.settings/org.eclipse.wst.common.component +++ b/maxkey-identitys/maxkey-identity-rest/.settings/org.eclipse.wst.common.component @@ -9,8 +9,5 @@ uses - - uses - diff --git a/maxkey-identitys/maxkey-identity-rest/build.gradle b/maxkey-identitys/maxkey-identity-rest/build.gradle index f3b5076a7..af68ea8de 100644 --- a/maxkey-identitys/maxkey-identity-rest/build.gradle +++ b/maxkey-identitys/maxkey-identity-rest/build.gradle @@ -10,6 +10,5 @@ dependencies { compile project(":maxkey-core") compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") } \ No newline at end of file diff --git a/maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component b/maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component index ee55793d0..12fb4919b 100644 --- a/maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component +++ b/maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component @@ -9,8 +9,5 @@ uses - - uses - diff --git a/maxkey-identitys/maxkey-identity-scim/build.gradle b/maxkey-identitys/maxkey-identity-scim/build.gradle index da59b114b..04f2e2063 100644 --- a/maxkey-identitys/maxkey-identity-scim/build.gradle +++ b/maxkey-identitys/maxkey-identity-scim/build.gradle @@ -10,6 +10,5 @@ dependencies { compile project(":maxkey-core") compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") } \ No newline at end of file diff --git a/maxkey-lib/maxkey-client-sdk-2.0.0.RELEASE.jar b/maxkey-lib/maxkey-client-sdk-2.0.0.RELEASE.jar new file mode 100644 index 0000000000000000000000000000000000000000..38aff510057bbe72359964799f5cb56d7ff2ccd0 GIT binary patch literal 99193 zcmb5VV~}Xwk}X=cZQHhO+t_8>w#{9(ZQHhO+q>%R+kIZY{_eefBHoOc>sMyPS`#Bj z=E$WW4GaPW00032K-O`l0PuGJ{jbO00r_{zimC|GO3I1R0|O}h!w{lPJF)(+!O!1` z^4|?*1?42gM3q(OWW{V^>)`?!FoNBXb^^AOzu6S)u&II+(Fo~A@`Z~1iiYPh`!+Wt zK%F+XebT6d`_r0Yw~h?z*?F`^5x~g*oEN2zK%UAf{HM?OMD z^j%NQ@ zhX36L`d>CShVE7-9{<)9>7S;?))pqV&i~c}^Z)8$?C4?dZ1;aSmSK0Wc!2@{1pa*` zs(^gq=4)U zNZf+}n}Hi@V&LkQl`X1>To@7IajLJ8B2R*kMpg6x{J{OdtW=(rgZUC*m7=;%_2JNY z%X#X$%RR0C^ZiZkZ}?SZz)yxEbC4JqXRjGug3@#l8EC76I?al?iaKO3JkkUN%0B!{ zEZR2Wq$N5Im1RHF+*DL}k{n1Vj*!$-n8m4p(PWDH3?(>QVziFHvl1~%BeGvDUQkU; zE|i$ib74Yj#{$x&``!xaLfpxzB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>_sv_rJY+4r6s;f7X#0*rUsUJqfUe+zF!r?uCkX2EB%_4 z2#rEv-3v^SgbD3l#<-F}qZb=xVc@$c7fKAlyAvW3@!bg~4-eTZ2Z{O>3Xy|&c~i_$ zxRR>G0%<9)a!OK=UF;H5yzxd9O}s56&i&AjOh938in*^M+#ParQi5dygAok> O%ne`>xfmaxkey-protocol-authorize maxkey-jose-jwt maxkey-core - maxkey-client-sdk maxkey-protocol-oauth-2.0 maxkey-protocol-saml-2.0 maxkey-identity-scim diff --git a/maxkey-web-manage/build.gradle b/maxkey-web-manage/build.gradle index b3bcd0adf..2c4995fc8 100644 --- a/maxkey-web-manage/build.gradle +++ b/maxkey-web-manage/build.gradle @@ -19,7 +19,6 @@ buildscript { dependencies { compile project(":maxkey-core") compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0") compile project(":maxkey-protocols:maxkey-protocol-saml-2.0") compile project(":maxkey-identitys:maxkey-identity-scim") diff --git a/maxkey-web-maxkey/.project b/maxkey-web-maxkey/.project index 57b762ddf..59895fa49 100644 --- a/maxkey-web-maxkey/.project +++ b/maxkey-web-maxkey/.project @@ -8,7 +8,6 @@ maxkey-protocol-oauth-2.0 maxkey-protocol-saml-2.0 maxkey-core - maxkey-client-sdk maxkey-authentications maxkey-protocol-authorize maxkey-protocol-cas diff --git a/maxkey-web-maxkey/build.gradle b/maxkey-web-maxkey/build.gradle index 504a6b0ff..c07b84378 100644 --- a/maxkey-web-maxkey/build.gradle +++ b/maxkey-web-maxkey/build.gradle @@ -18,7 +18,6 @@ buildscript { dependencies { compile project(":maxkey-core") compile project(":maxkey-persistence") - compile project(":maxkey-client-sdk") compile project(":maxkey-authentications") diff --git a/settings.gradle b/settings.gradle index abe455627..8e205441e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,7 +4,6 @@ rootProject.name = 'MaxKey' //Common -include 'maxkey-client-sdk' include 'maxkey-core' include 'maxkey-persistence' include 'maxkey-authentications' @@ -14,22 +13,6 @@ include 'maxkey-identitys:maxkey-identity-scim' include 'maxkey-identitys:maxkey-identity-kafka' include 'maxkey-identitys:maxkey-identity-rest' - -//connectors -include 'maxkey-connectors:maxkey-connector-base' -//MS Active Directory -include 'maxkey-connectors:maxkey-connector-activedirectory' -//OpenLDAP -include 'maxkey-connectors:maxkey-connector-ldap' -//企业微信 -include 'maxkey-connectors:maxkey-connector-workweixin' -//阿里钉钉 -include 'maxkey-connectors:maxkey-connector-dingding' -//字节跳动飞书 -include 'maxkey-connectors:maxkey-connector-feishu' -//华为WeLink -include 'maxkey-connectors:maxkey-connector-welink' - //Protocol //include 'maxkey-protocols' include 'maxkey-protocols:maxkey-protocol-oauth-2.0'