-
Notifications
You must be signed in to change notification settings - Fork 8
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
Modify apple authenticator to enable federation flow in API based Authentication and Nonce validation #9
Modify apple authenticator to enable federation flow in API based Authentication and Nonce validation #9
Conversation
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9734468257
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9743477163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -145,8 +151,13 @@ protected void initiateAuthenticationRequest(HttpServletRequest request, HttpSer | |||
String clientId = authenticatorProperties.get(OIDCAuthenticatorConstants.CLIENT_ID); | |||
String authorizationEP = getAuthorizationServerEndpoint(authenticatorProperties); | |||
String callbackUrl = getCallbackUrl(authenticatorProperties); | |||
String state = getStateParameter(context, authenticatorProperties); | |||
if (Boolean.parseBoolean((String) context.getProperty(IS_API_BASED))) { | |||
callbackUrl = resolveCallBackURLForAPIBasedAuthFlow(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we have line 153 as the else block of this if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can have getCallbackUrl
method in this class and define this logic there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 9f2bc6f
@@ -145,8 +151,13 @@ protected void initiateAuthenticationRequest(HttpServletRequest request, HttpSer | |||
String clientId = authenticatorProperties.get(OIDCAuthenticatorConstants.CLIENT_ID); | |||
String authorizationEP = getAuthorizationServerEndpoint(authenticatorProperties); | |||
String callbackUrl = getCallbackUrl(authenticatorProperties); | |||
String state = getStateParameter(context, authenticatorProperties); | |||
if (Boolean.parseBoolean((String) context.getProperty(IS_API_BASED))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when this IS_API_BASED
property is set in the context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being set at the framework[1].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why can't we use the same constant defined in the framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This concern was addressed with 9f2bc6f
PR builder started |
PR builder started |
PR builder completed |
protected String getScope(Map<String, String> authenticatorProperties) { | ||
|
||
String scopes = authenticatorProperties.get(IdentityApplicationConstants.Authenticator.OIDC.SCOPES); | ||
return scopes.replace(",", " ").replace("+", " "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add a null check here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also lets take the separators to constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9773189192
* @param context Authentication context. | ||
* @return Callback URL. | ||
*/ | ||
private String getCallBackURL(AuthenticationContext context, Map<String, String> authenticatorProperties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we inherit this method from OpenIDConnectAuthenticator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was addressed in 1a9f83d
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9789383875
This PR includes the below given changes
Related issue:
Merge the PR after merging the below given PR and bumping the oidc version:
Sample Responses
/authorize
request/authn
request (Native mode)/authn
request (Redirection mode)Related links:
[1] https://developer.apple.com/documentation/authenticationservices/asauthorizationopenidrequest/nonce
Sample JWT Payload from apple IDP