-
Notifications
You must be signed in to change notification settings - Fork 263
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
add custom token provider support #2613
Conversation
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.
Hi @tnazarew, so happy to see you back here. Thanks for preparing the amazing PR! 🥇
|
||
@NoArgsConstructor | ||
@ToString | ||
public class FakeTokenProvider implements TokenProvider { |
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.
you can try it as static class within ArgumentParserTest if you like
public JavaType typeFromId(DatabindContext context, String id) { | ||
Class<?> subType = null; | ||
if (Objects.equals(id, "api_key")) // backwards compatibility | ||
return context.constructSpecializedType(superType, ApiKeyTokenProvider.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.
don't forget our old friend Spotless
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.
funny thing is, when you forget to put curly brackets after if
, spotless doesn't even recognise it as incorrect and spotlessApply changes indentation to what you can see here
2d18071
to
e14dcb9
Compare
91f5a5b
to
5a400cf
Compare
Problem
OL didn't have a support for custom token providers
Closes: #2542
Solution
TokenProviderTypeIdResolver
was added to handle both FQCN and (for backward compatibility)api_key
type inspark.openlineage.transport.auth.type
One-line summary:
Checklist
SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the OpenLineage project