Implementation of Oauth token generator with feign client #1

Merged
amalka.subasinghe merged 9 commits from tharusha/oauth-extensions:feign_client_impl into master 1 month ago
There is no content yet.
tharusha added 1 commit 2 months ago
tharusha added 1 commit 2 months ago
tharusha added 1 commit 2 months ago
tharusha added 1 commit 2 months ago
kaif2 reviewed 2 months ago
private String refreshToken;
@Value("${jwt-token}")
private String jwtToken;

why is this annotated with @value?

why is this annotated with @value?
kaif2 reviewed 2 months ago
@Component
public class TokenDataHolder {
private String access_token;

use camel case for variable definition

use camel case for variable definition
amalka.subasinghe requested changes 2 months ago
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.2

do we really need these files?

do we really need these files?
kaif2 reviewed 2 months ago
switch (grantType) {
case "implicit":

Grant type is not mentioned in latest APIM Docs.
remove this, since if not implemented can be return from default case.

Grant type is not mentioned in latest APIM Docs. remove this, since if not implemented can be return from default case.
tharusha added 1 commit 2 months ago
tharusha added 1 commit 2 months ago
kaif2 reviewed 2 months ago
if (errorMessage != null && errorMessage.contains("[401]")) {
log.error("Client credentials or client secret is incorrect: {}", errorMessage);
return createErrorResponse(500,

status code should be 401

status code should be 401
tharusha added 1 commit 1 month ago
amalka.subasinghe requested changes 1 month ago
<?xml version="1.0" encoding="UTF-8"?>

no licence header

no licence header
<version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>io.entgra</groupId>

project folder name - oauth-token-generator
group id - io.entgra.oauth.token.generator
artifact id - oauth-token-generator
version - 1.0-SNAPSHOT

project folder name - oauth-token-generator group id - io.entgra.oauth.token.generator artifact id - oauth-token-generator version - 1.0-SNAPSHOT
package io.entgra.auth_token_getter;

package name io.entgra.oauth.token.generator

package name io.entgra.oauth.token.generator
package io.entgra.auth_token_getter;
/*

licence should be the first one in the class

licence should be the first one in the class
// Method to fetch the token and store it in TokenDataHolder
public ResponseEntity<Object> fetchToken(String scope) {
// Basic validation for required fields
if (clientId == null || clientId.isEmpty()) {

you can use StringUtils here

you can use StringUtils here
#spring.application.name=auth_token_getter
auth_token_generation_uri=https://mgt.sg.local/
client-id=AtczeBBwunLMt7Ol4Xc7eNDEuXsa
client-secret=DX8dGTmN7elF3zQsSfbH4yjVm08a

use one pattern to define keys here either . - or _

use one pattern to define keys here either . - or _
#grant-type=password
refresh-token=""
jwt-token =""
saml2-assertion=""

why configurong refresh tokens, jwt tokens and saml2-assertion

why configurong refresh tokens, jwt tokens and saml2-assertion
package io.entgra.auth_token_getter;

no licence headers

no licence headers
tharusha added 1 commit 1 month ago
tharusha added 1 commit 1 month ago
amalka.subasinghe approved these changes 1 month ago
amalka.subasinghe merged commit 408c350c82 into master 1 month ago

Reviewers

amalka.subasinghe approved these changes 1 month ago
The pull request has been merged as 408c350c82.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/oauth-extensions#1
Loading…
There is no content yet.