Skip to content

Commit

Permalink
Merge pull request #663 from JanssenProject/jans-auth-server-register…
Browse files Browse the repository at this point in the history
…-custom-response

feat(jans-ce-setup): updated client registration script with newly added methods
  • Loading branch information
devrimyatar authored Jan 21, 2022
2 parents 2aa2ba8 + 3841ae8 commit 57d0fa0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,19 @@ def getCN_of_AS(self ) :
print "Client Registration. Failed to get CN of AS from the transport keystore. Exception: ", sys.exc_info()[1]
return None

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPutResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyReadResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPostResponse(self, responseAsJsonObject, executionContext):
return False


15 changes: 15 additions & 0 deletions jans-ce-setup/static/extension/client_registration/Casa.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,18 @@ def prepareClientRedirectUris(self, configurationAttributes):
i = i + 1

return clientRedirectUrisSet

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPutResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyReadResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPostResponse(self, responseAsJsonObject, executionContext):
return False
15 changes: 15 additions & 0 deletions jans-ce-setup/static/extension/client_registration/SampleScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,18 @@ def getSoftwareStatementJwks(self, context):
# context refers to io.jans.as.server.service.external.context.DynamicClientRegistrationContext - see https://github.com/JanssenProject/jans-auth-server/blob/e083818272ac48813eca8525e94f7bd73a7a9f1b/server/src/main/java/io/jans/as/server/service/external/context/DynamicClientRegistrationContext.java#L24
def isCertValidForClient(self, cert, context):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPutResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyReadResponse(self, responseAsJsonObject, executionContext):
return False

# responseAsJsonObject - is org.json.JSONObject, you can use any method to manipulate json
# context is reference of io.jans.as.server.model.common.ExecutionContext
def modifyPostResponse(self, responseAsJsonObject, executionContext):
return False

0 comments on commit 57d0fa0

Please sign in to comment.