-
Notifications
You must be signed in to change notification settings - Fork 145
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
Update the /identity-providers/ API to manage user-defined federated authenticators. #735
base: master
Are you sure you want to change the base?
Update the /identity-providers/ API to manage user-defined federated authenticators. #735
Conversation
64340ab
to
a2fb35c
Compare
05be0f7
to
cfc2832
Compare
553c635
to
88ce34f
Compare
...rc/main/java/org/wso2/carbon/identity/api/server/idp/v1/core/ServerIdpManagementService.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/wso2/carbon/identity/api/server/idp/v1/core/ServerIdpManagementService.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/wso2/carbon/identity/api/server/idp/v1/core/ServerIdpManagementService.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/wso2/carbon/identity/api/server/idp/v1/core/ServerIdpManagementService.java
Show resolved
Hide resolved
2d0d880
to
65d508c
Compare
65d508c
to
6d3a143
Compare
String authenticatorName = getDecodedAuthenticatorName(authenticator.getAuthenticatorId()); | ||
String definedByType; | ||
if (isNewFederatedAuthenticator) { | ||
definedByType = resolveDefinedByTypeForCreateFederatedAuthenticator( |
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.
resolveDefinedByTypeForCreateFederatedAuthenticator -> resolveDefinedByTypeToCreateFederatedAuthenticator
String authenticatorName = getDecodedAuthenticatorName(authenticator.getAuthenticatorId()); | ||
String definedByType; | ||
if (isNewFederatedAuthenticator) { | ||
definedByType = resolveDefinedByTypeForCreateFederatedAuthenticator( |
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.
resolveDefinedByTypeForCreateFederatedAuthenticator -> resolveDefinedByTypeToCreateFederatedAuthenticator
definedByType = authenticator.getDefinedBy().toString(); | ||
String authenticatorName = getDecodedAuthenticatorName(authenticator.getAuthenticatorId()); | ||
String definedByType; | ||
if (isNewFederatedAuthenticator) { |
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, when I said to get rid of this boolean I meant having separate methods from the 'updateFederatedAuthenticatorConfig' level. If that's hard it's fine to resolve passing this property
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.
However I feel having these two methods separated is also good and it's clear.
Check if we can get to top level
FederatedAuthenticatorPUTRequest authenticator) throws IdentityProviderManagementClientException { | ||
|
||
String authenticatorName = getDecodedAuthenticatorName(federatedAuthenticatorId); | ||
String definedByType = resolveDefinedByTypeForUpdateFederatedAuthenticator(authenticatorName).toString(); |
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.
resolveDefinedByTypeForUpdateFederatedAuthenticator -> resolveDefinedByTypeToUpdateFederatedAuthenticator
ERROR_CODE_ENDPOINT_PROVIDED_FOR_SYSTEM_AUTH("60039", "No endpoint configuration is allowed " + | ||
"for system defined authenticators.", "No endpoint configuration must be " + | ||
"provided for the system defined federated authenticators %s."), | ||
ERROR_CODE_PROPERTIES_PROVIDED_FOR_USER_AUTH("60040", "No properties are allowed for " + | ||
"user defined authenticators.", "No properties must be provided for the user defined " + | ||
"federated authenticators %s."), |
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 we simplify the error message of these two cases. It's almost similar to a description
37e58e2
to
fa4caea
Compare
fa4caea
to
6500b42
Compare
Issue:
This PR introduces improvements to the following APIs for managing user-defined federated authenticators:
Service layer PR: