Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

SDIT-1113: 🔒️ Secure automated refresh endpoint and test #511

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

petergphillips
Copy link
Contributor

No description provided.

@petergphillips petergphillips force-pushed the pgp-SDIT-1113-secure-automated-refresh branch from 3206cc5 to 9c36e36 Compare October 6, 2023 07:57
Comment on lines +50 to +58
testClazz.memberFunctions
.filter { it.name.contains("access forbidden") }
.map {
it.name
.substringAfter("for endpoint ")
.substringBefore(" when no role")
.replace("#", "/")
}
}
Copy link
Contributor

@mikehalmamoj mikehalmamoj Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not keen on this - for all I know the test has the right name but tests something entirely different. Not sure of a better way though 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Ideally though wouldn't be needed at all since the resources will have the annotations. However didn't want to start changing this project since we're in the process of ripping it all out anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would still be relevant for Prison API though

Copy link
Contributor

@steverendell steverendell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

mapping.handlerMethods.forEach { (mappingInfo, method) ->
val classAnnotation = method.beanType.getAnnotation(PreAuthorize::class.java)
val annotation = method.getMethodAnnotation(PreAuthorize::class.java)
println("Found $mappingInfo with class annotation $classAnnotation and annotation $annotation")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this line a temporary data dump?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it was, will remove in next PR

@petergphillips petergphillips merged commit 4ca2f12 into main Oct 6, 2023
4 checks passed
@petergphillips petergphillips deleted the pgp-SDIT-1113-secure-automated-refresh branch October 6, 2023 08:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants