-
Notifications
You must be signed in to change notification settings - Fork 4
#46: Implementation of bootique-shiro-web-oidconnect #47
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
base: master
Are you sure you want to change the base?
Conversation
@Override | ||
public void configure(Binder binder) { | ||
ShiroWebModule.extend(binder).setFilter(OID_CONNECT_BEARER_AUTHENTICATION_FILTER_NAME, OidConnectFilter.class); | ||
JerseyModule.extend(binder).addResource(JwtOpenIdCallbackHandler.class); |
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.
Directly registering JwtOpenIdCallbackHandler
will only work for the default URL that will be taken from the annotation @Path("/bq-shiro-oauth-callback")
. A custom callbackUri
will be ignored. To handle custom endpoint URLs, you will need to remove the annotation, and create a "provide" method for MappedResource<JwtOpenIdCallbackHandler>
that will allow setting up custom URLs
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.
Done
return new JwtBearerAuthenticationFilter(tokenParser, this.audience); | ||
} | ||
|
||
public String provideAudience() { |
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.
Ah, I forgot that the new filter will also need audience
. I suppose we can keep it here for now, but after we merge the PR, I am thinking of refactoring both shirowebjwt
and shiroweboidconnect
config structure, so that we don't need to share properties (likely going back to your original idea of nested configurations were properties are organized by "filter", "callback", "jwks", etc.).
Anyways, no change is needed in this PR
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.
Ok
import java.nio.charset.StandardCharsets; | ||
import java.util.*; | ||
|
||
public class OidConnectUtils { |
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.
I guess this class doesn't have to be public
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.
Done
return params.toString(); | ||
} | ||
|
||
static Map<String, Object> getOidpParametersMap(String baseUri, String originalUri, String clientId, String callbackUri) { |
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.
I think this method is unused
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.
Deleted
} | ||
|
||
@GET | ||
public Response callback(@Context UriInfo uriInfo) { |
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.
We know the parameter names, so we can model them in the method signature using @QueryParam
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.
Done
No description provided.