This is an automated email from the ASF dual-hosted git repository.
arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 2f4dcbdd6 FINERACT-1820: Update for Authentication in Legacy Docs
2f4dcbdd6 is described below
commit 2f4dcbdd6cb10146704b760e4a1e060062bc7385
Author: Vic Romero <[email protected]>
AuthorDate: Sat Nov 26 22:36:25 2022 -0600
FINERACT-1820: Update for Authentication in Legacy Docs
---
.../api/AuthenticationApiResourceSwagger.java | 2 +-
.../security/api/SelfAuthenticationApiResource.java | 3 +++
.../main/resources/static/legacy-docs/apiLive.htm | 20 ++++++++++++++------
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java
index 22a7d179e..8a650230f 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java
@@ -26,7 +26,7 @@ import org.apache.fineract.useradministration.data.RoleData;
/**
* Created by sanyam on 13/8/17.
*/
-final class AuthenticationApiResourceSwagger {
+public final class AuthenticationApiResourceSwagger {
private AuthenticationApiResourceSwagger() {
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java
index e5d3cd2a8..bb881048e 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java
@@ -21,6 +21,7 @@ package org.apache.fineract.portfolio.self.security.api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -30,6 +31,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import
org.apache.fineract.infrastructure.security.api.AuthenticationApiResource;
+import
org.apache.fineract.infrastructure.security.api.AuthenticationApiResourceSwagger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Scope;
@@ -54,6 +56,7 @@ public class SelfAuthenticationApiResource {
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Verify authentication", description = "Authenticates
the credentials provided and returns the set roles and permissions allowed.\n\n"
+ "Please visit this link for more info -
https://fineract.apache.org/legacy-docs/apiLive.htm#selfbasicauth")
+ @RequestBody(required = true, content = @Content(schema =
@Schema(implementation =
AuthenticationApiResourceSwagger.PostAuthenticationRequest.class)))
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content =
@Content(schema = @Schema(implementation =
SelfAuthenticationApiResourceSwagger.PostSelfAuthenticationResponse.class))) })
public String authenticate(final String apiRequestBodyAsJson) {
diff --git
a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm
b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm
index 7efe917f9..600844d55 100644
--- a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm
+++ b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm
@@ -39003,12 +39003,16 @@ Request Body:
</div>
<div class="method-example">
<code class="method-declaration">
-POST
https://DomainName/api/v1/authentication?username={username}&password={password}
+POST https://DomainName/api/v1/authentication
</code>
<code class="method-request">
-POST authentication?username=mifos&password=password
+POST authentication
Content-Type: application/json
-No Request Body
+Request Body
+{
+ "username": "mifos",
+ "password": "password"
+}
</code>
<p>Example response of autentication
for user that is not linked with any staff.</p>
<code class="method-response">
@@ -46956,12 +46960,16 @@ No Request Body
</div>
<div class="method-example">
<code class="method-declaration">
-POST
https://DomainName/api/v1/self/authentication?username={username}&password={password}
+POST https://DomainName/api/v1/self/authentication
</code>
<code class="method-request">
-POST self/authentication?username=mifos&password=password
+POST self/authentication
Content-Type: application/json
-No Request Body
+Request Body
+{
+ "username": "mifos",
+ "password": "password"
+}
</code>
<p>Example response of autentication
for user</p>
<code class="method-response">