Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config-ap): lock audit endpoint parameter declaration error#9460 #9473

Merged
merged 75 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
a3f3a66
fix(config-api): asset mgt endpoint fixes
pujavs Aug 5, 2024
9e309c0
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 5, 2024
59fd269
feat(config-api): asset upload mgt ehancement and fido
pujavs Aug 6, 2024
5a6396a
feat(config-api): asset upload mgt ehancement and fido
pujavs Aug 6, 2024
521f7b1
feat(config-api): asset upload mgt ehancement and fido
pujavs Aug 6, 2024
73618dd
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 6, 2024
583c881
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 7, 2024
95c57e4
fix(config-api): asset upload
pujavs Aug 8, 2024
ca50ec7
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 8, 2024
bbcbc92
fix(config-api): lock review comments
pujavs Aug 8, 2024
2bb92e3
feat(config-api): lock code review comments
pujavs Aug 9, 2024
c900d5f
feat(config-api): lock master renamed to lock server
pujavs Aug 9, 2024
eb62da4
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 9, 2024
6fad621
feat(config-api): lock master renamed to lock server
pujavs Aug 9, 2024
d17d2e6
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 9, 2024
7fefadb
feat(config-api): lock master renamed to lock server
pujavs Aug 9, 2024
cf85c47
feat(config-api): lock master renamed to lock server
pujavs Aug 9, 2024
c0444b5
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 11, 2024
ccf9ace
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 12, 2024
2d4a379
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 12, 2024
dd6555c
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 12, 2024
4696f98
feat(config-api): fido2 delete functionality
pujavs Aug 13, 2024
3b51e0d
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 13, 2024
5af8a00
fix(config-api): acr validation
pujavs Aug 14, 2024
88e3a20
feat(config-api): doc(config-api): IDP schema attribute descriptions …
pujavs Aug 15, 2024
cadc584
feat(config-api): sync with main
pujavs Aug 15, 2024
c4eb118
feat(config-api): sync with main
pujavs Aug 15, 2024
4de3cc0
feat(config-api): uploading assets via API generates 2 entries #9178
pujavs Aug 15, 2024
dfbc4f1
feat(config-api): asset mgt, fido and IDP changes
pujavs Aug 16, 2024
c3ba202
feat(config-api): fido2 device endpoint
pujavs Aug 19, 2024
34d1c9a
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 20, 2024
4473a90
feat(config-api): fido2 endpoint
pujavs Aug 20, 2024
6d974ed
feat(config-api): fido2 endpoint
pujavs Aug 20, 2024
5272c28
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 21, 2024
c6f2234
feat(config-api): sync with main
pujavs Aug 21, 2024
cbc8164
feat(config-api): sync with main
pujavs Aug 21, 2024
8e45ae3
feat(config-api): sync with main
pujavs Aug 21, 2024
d2c8277
feat(config-api): resolved sonar review issues
pujavs Aug 21, 2024
792c81c
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 22, 2024
9dfba84
feat(config-api): sonar review comment fix
pujavs Aug 22, 2024
54b2f59
feat(config-api): swagger spec
pujavs Aug 22, 2024
8d92097
feat(config-api): swagger spec
pujavs Aug 22, 2024
e078be2
feat(config-api): saml config attribute description
pujavs Aug 22, 2024
b7eac33
doc(config-api): added SAML attribute description
pujavs Aug 23, 2024
1fd93d8
doc(config-api): added SAML attribute description
pujavs Aug 23, 2024
28fed18
feat(config-api): sync with main
pujavs Aug 26, 2024
0d05fb6
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 27, 2024
573e47e
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Aug 30, 2024
4590a55
feat(config-api): sync with main
pujavs Aug 30, 2024
cd764d6
fix(jans-lock): code review comment fix isssue#9305
pujavs Aug 30, 2024
d4e4c41
fix(jans-lock): code review comment fix isssue#9305
pujavs Aug 30, 2024
07ca449
feat(config-api): lock review point
pujavs Sep 2, 2024
2e98591
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 3, 2024
a513d11
fix(lock): code review comment
pujavs Sep 3, 2024
7e86521
fix(lock): code review comment
pujavs Sep 3, 2024
db7f37d
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 4, 2024
f1c1c29
fix(config-api): sync with main
pujavs Sep 4, 2024
77c5d46
feat(config-api): lock endpoint fixes and SAML IDP NPE
pujavs Sep 5, 2024
e00453b
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 5, 2024
89e16ee
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 6, 2024
39a8321
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 6, 2024
43323bf
feat(config-api): asset enhancement
pujavs Sep 9, 2024
7de3f99
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 9, 2024
e982673
feat(config-api): implement timer for asset mgt to fetch and deploy a…
pujavs Sep 9, 2024
fb95955
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 9, 2024
ec1eb27
fix(config-api): scope validation issue #9426
pujavs Sep 9, 2024
847b024
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 10, 2024
eac818b
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 10, 2024
ea2479f
fix(config-api): asset delete error fix
pujavs Sep 10, 2024
9a5b999
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 10, 2024
4b0b0b8
feat(config-api): sysnc with main
pujavs Sep 11, 2024
c8121e9
feat(config-api): sysnc with main
pujavs Sep 11, 2024
41104fc
Merge branch 'main' of https://github.com/JanssenProject/jans into ja…
pujavs Sep 12, 2024
17d91eb
fix(config-ap): lock audit endpoint parameter declaration error#9460
pujavs Sep 12, 2024
8058ab9
Merge branch 'main' into jans-config-fix
yuriyz Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(jans-lock): code review comment fix isssue#9305
Signed-off-by: pujavs <pujas.works@gmail.com>
  • Loading branch information
pujavs committed Aug 30, 2024
commit d4e4c41d8d7dee91515898b239d5ddc9fad7956c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.slf4j.Logger;

@ApplicationScoped
public class LockUtil {
public class TokenEndpointService {

private static final String CONTENT_TYPE = "Content-Type";
private static final String AUTHORIZATION = "Authorization";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.jans.lock.service.audit;

import io.jans.as.model.uma.wrapper.Token;
import io.jans.lock.service.LockUtil;
import io.jans.lock.service.TokenEndpointService;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.servlet.http.HttpServletRequest;
Expand All @@ -26,7 +26,7 @@ public class AuditService {
private Logger log;

@Inject
LockUtil lockUtil;
TokenEndpointService tokenEndpointService;

private Map<String, Date> tokenDetails = new HashMap<>();

Expand All @@ -37,7 +37,7 @@ public Response post(String endpoint, String postData, ContentType contentType)

Date tokenExpiryDate = this.getTokenExpiryDate();
log.debug("postData - tokenExpiryDate:{}", tokenExpiryDate);
boolean isTokenValid = this.lockUtil.isTokenValid(tokenExpiryDate);
boolean isTokenValid = this.tokenEndpointService.isTokenValid(tokenExpiryDate);
log.debug("postData - tokenDetails:{}, tokenExpiryDate:{}, isTokenValid:{}", tokenDetails, tokenExpiryDate,
isTokenValid);
if (tokenDetails != null && !tokenDetails.isEmpty() && isTokenValid) {
Expand All @@ -47,25 +47,25 @@ public Response post(String endpoint, String postData, ContentType contentType)
log.debug("Generating new token !");
accessToken = this.getAccessTokenForAudit(endpoint);
}
return this.lockUtil.post(endpoint, postData, contentType, accessToken);
return this.tokenEndpointService.post(endpoint, postData, contentType, accessToken);
}

public JSONObject getJSONObject(HttpServletRequest request) {
return this.lockUtil.getJSONObject(request);
return this.tokenEndpointService.getJSONObject(request);
}

private String getAccessTokenForAudit(String endpoint) {
log.debug("Get Access Token For Audit endpoint:{}", endpoint);
String accessToken = null;
Token token = this.lockUtil.getAccessToken(endpoint, true);
Token token = this.tokenEndpointService.getAccessToken(endpoint, true);
log.debug("Get Access Token For Audit endpoint:{}, token:{}", endpoint, token);

if (token != null) {
accessToken = token.getAccessToken();
Integer expiresIn = token.getExpiresIn();
log.debug("Get Access Token For Audit endpoint:{}, accessToken:{}, expiresIn", endpoint, accessToken);

tokenDetails.put(accessToken, this.lockUtil.computeTokenExpiryTime(expiresIn));
tokenDetails.put(accessToken, this.tokenEndpointService.computeTokenExpiryTime(expiresIn));
}
return accessToken;
}
Expand Down