Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Scope of this feature is to provide only platform capability and doesn't include any UI.

Separate

...

URL endpoints for customer self service


New root resource url /mifosng-selfservice would be defined where all the self service APIs would be exposed.The resources exposed as part of this root would be similar to /mifosng-provider root. For eg, API to get list of loans in self-service would be /mifosng-selfserviceAll the APIs resources for customer self service would start with /mifosng-provider/api/v1/loansself.This would be achieved similar to the suggestion provided here http://stackoverflow.com/questions/10231854/multiple-jersey-applications-with-same-path-for-root-resource

Having separate root context for this API comes with lot of complications. It would require changes at tomcat deployment level.

Identifying self service user

...

This API would be available only /mifosng-provider root, indicating this is in control of back for back office/administrative user.

...

A self service user should be  able to use only self service APIs and back officer should not have access to self service APIs and vice versa.

Any APIs API with root /mifosng-provider should be accessible only for m_appusers whose is_self_service_user attribute is false and Any APIs with root /mifosng-selfservice URL containing /self/ should be accessible only for m_appusers whose is_self_service_user attribute is true.

Two new AuthenticationProvider classes would be created extending existing default spring DaoAuthenticationProvider one each for /mifosng-provider and /mifosng-selfservice rootsURLs with /self/ and one for existing APIs. These extensions would additionally check the is_self_service_user attribute and enforce proper authorisation.

...

UsecaseAPI
Authentication Basic HTTP/mifosng-selfserviceprovider/api/v1/self/authentication?username={username}&password={password}
Authentication Oauth2/mifosng-selfserviceprovider/api/self/oauth/token?username={username}&password={password}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret}
 /mifosng-selfserviceprovider/api/self/oauth/token?refresh_token={refresh_token}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret}
 /mifosng-selfserviceprovider/api/v1/self/userdetails?access_token={access_token}
List Clients/mifosng-selfserviceprovider/api/v1/self/clients
Retrieve a Client/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}
Retrieve client accounts overview

/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/accounts

Get client image/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/images
List client charges/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/charges
Retrieve a client charge/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/charges/{clientChargeId}
List client transactions/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/transactions
Retrieve a client transaction/mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/transaction/{transactionId}
Retrieve a Savings Account/mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}
List Savings account transactions/mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/transactions
Retrieve a savings account transaction/mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/transactions/{transactionId}
List Savings account charges/mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/charges
Retrieve a savings account charge/mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
Retrieve a Loan/mifosng-selfserviceprovider/api/v1/self/loans/{loanId}
List loan account transactions/mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/transactions
Retrieve loan account transaction/mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/transactions/{transactionId}
List loan account charges/mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/charges
Retrieve a loan account charge/mifosng-selfservice/api/v1/loans/{loanId}/charges/{chargeId}

...