fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [3/4] fineract git commit: Merge branch 'TwoFactor' into develop
Date Mon, 27 Nov 2017 12:11:26 GMT
Merge branch 'TwoFactor' into develop


Project: http://git-wip-us.apache.org/repos/asf/fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/fineract/commit/1a501287
Tree: http://git-wip-us.apache.org/repos/asf/fineract/tree/1a501287
Diff: http://git-wip-us.apache.org/repos/asf/fineract/diff/1a501287

Branch: refs/heads/develop
Commit: 1a50128757632e2128e7ae68a47ca2974f5a792e
Parents: 4dbecc7 1a966e8
Author: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Mon Nov 27 15:04:28 2017 +0530
Committer: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Mon Nov 27 15:04:28 2017 +0530

----------------------------------------------------------------------
 api-docs/apiLive.htm                            | 242 +++++++++++++++
 api-docs/apidocs.css                            |   4 +
 fineract-provider/build.gradle                  |  36 ++-
 .../basicauth/twofactor/application.properties  |  21 ++
 .../oauth/twofactor/application.properties      |  21 ++
 .../commands/service/CommandWrapperBuilder.java |  14 +
 .../domain/ConfigurationDomainService.java      |   9 +-
 .../domain/ConfigurationDomainServiceJpa.java   |  37 +++
 .../boot/AbstractApplicationConfiguration.java  |   3 +-
 .../core/boot/WebTwoFactorXmlConfiguration.java |  36 +++
 .../security/api/AuthenticationApiResource.java |  14 +-
 .../security/api/TwoFactorApiResource.java      | 132 ++++++++
 .../api/TwoFactorConfigurationApiResource.java  |  86 ++++++
 .../security/api/UserDetailsApiResource.java    |  17 +-
 .../InvalidateTFAccessTokenCommandHandler.java  | 108 +++++++
 .../UpdateTwoFactorConfigCommandHandler.java    |  60 ++++
 .../TwoFactorConfigurationConstants.java        |  59 ++++
 .../security/constants/TwoFactorConstants.java  |  30 ++
 .../security/data/AccessTokenData.java          |  47 +++
 .../data/AuthenticatedOauthUserData.java        |  12 +-
 .../security/data/AuthenticatedUserData.java    |  12 +-
 .../security/data/OTPDeliveryMethod.java        |  38 +++
 .../security/data/OTPMetadata.java              |  53 ++++
 .../security/data/OTPRequest.java               |  53 ++++
 .../data/TwoFactorConfigurationValidator.java   | 120 ++++++++
 .../security/domain/OTPRequestRepository.java   |  51 ++++
 .../security/domain/TFAccessToken.java          | 137 +++++++++
 .../domain/TFAccessTokenRepository.java         |  31 ++
 .../security/domain/TwoFactorConfiguration.java |  84 +++++
 .../TwoFactorConfigurationRepository.java       |  34 +++
 .../exception/AccessTokenInvalidIException.java |  28 ++
 .../OTPDeliveryMethodInvalidException.java      |  29 ++
 .../exception/OTPTokenInvalidException.java     |  28 ++
 .../InsecureTwoFactorAuthenticationFilter.java  |  82 +++++
 .../filter/TwoFactorAuthenticationFilter.java   | 139 +++++++++
 .../service/AccessTokenGenerationService.java   |  24 ++
 .../security/service/RandomOTPGenerator.java    |  38 +++
 .../service/TwoFactorConfigurationService.java  |  51 ++++
 .../TwoFactorConfigurationServiceImpl.java      | 304 +++++++++++++++++++
 .../security/service/TwoFactorService.java      |  43 +++
 .../security/service/TwoFactorServiceImpl.java  | 229 ++++++++++++++
 .../security/service/TwoFactorUtils.java        |  47 +++
 .../UUIDAccessTokenGenerationService.java       |  32 ++
 .../useradministration/domain/AppUser.java      |  17 ++
 .../main/resources/META-INF/spring/ehcache.xml  |   4 +
 .../META-INF/spring/securityContext.xml         |  38 ++-
 .../core_db/V336__two_factor_authentication.sql |  63 ++++
 47 files changed, 2762 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/fineract/blob/1a501287/fineract-provider/src/main/java/org/apache/fineract/commands/service/CommandWrapperBuilder.java
----------------------------------------------------------------------
diff --cc fineract-provider/src/main/java/org/apache/fineract/commands/service/CommandWrapperBuilder.java
index 359e427,93bd160..ae53bb7
--- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/CommandWrapperBuilder.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/CommandWrapperBuilder.java
@@@ -3039,83 -3039,20 +3039,97 @@@ public class CommandWrapperBuilder 
          this.entityId = adHocId;
          this.href = "/adhocquery/" + adHocId;
          this.json = "{}";
 +        return this ;
 +    }
 +    public CommandWrapperBuilder createEmail() {
 +        this.actionName = "CREATE";
 +        this.entityName = "EMAIL";
 +        this.entityId = null;
 +        this.href = "/emailcampaigns/template";
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder updateEmail(final Long resourceId) {
 +        this.actionName = "UPDATE";
 +        this.entityName = "EMAIL";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId;
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder deleteEmail(final Long resourceId) {
 +        this.actionName = "DELETE";
 +        this.entityName = "EMAIL";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId;
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder createEmailCampaign() {
 +        this.actionName = "CREATE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = null;
 +        this.href = "/emailcampaigns/campaign";
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder updateEmailCampaign(final Long resourceId) {
 +        this.actionName = "UPDATE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId;
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder deleteEmailCampaign(final Long resourceId) {
 +        this.actionName = "DELETE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId;
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder activateEmailCampaign(final Long resourceId) {
 +        this.actionName = "ACTIVATE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId + "?command=activate";
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder closeEmailCampaign(final Long resourceId) {
 +        this.actionName = "CLOSE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId + "?command=close";
 +        return this;
 +    }
 +    public CommandWrapperBuilder reactivateEmailCampaign(final Long resourceId) {
 +        this.actionName = "REACTIVATE";
 +        this.entityName = "EMAIL_CAMPAIGN";
 +        this.entityId = resourceId;
 +        this.href = "/emailcampaigns/"+resourceId + "?command=reactivate";
 +        return this;
 +    }
 +
 +    public CommandWrapperBuilder updateEmailConfiguration() {
 +        this.actionName = "UPDATE";
 +        this.entityName = "EMAIL_CONFIGURATION";
 +        this.href = "/emailcampaigns/configuration/";
          return this;
      }
+ 
+     public CommandWrapperBuilder invalidateTwoFactorAccessToken() {
+         this.actionName = "INVALIDATE";
+         this.entityName = "TWOFACTOR_ACCESSTOKEN";
+         this.href = "/twofactor/invalidate";
+         return this;
+     }
+ 
+     public CommandWrapperBuilder updateTwoFactorConfiguration() {
+         this.actionName = "UPDATE";
+         this.entityName = "TWOFACTOR_CONFIGURATION";
+         this.href = "/twofactor/configure";
+         return this;
+     }
  }


Mime
View raw message