-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add auth client #476
Conversation
12616cd
to
7b9d73b
Compare
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.
just the one possible blocker about the token endpoint, otherwise i think we can ship this
src/Momento.Sdk/Auth/Utils.cs
Outdated
@@ -65,6 +68,9 @@ public static TokenAndEndpoints TryDecodeAuthToken(string authToken) | |||
return new TokenAndEndpoints( | |||
authToken, | |||
claims.ControlEndpoint, | |||
claims.CacheEndpoint, | |||
// TODO: assuming legacy tokens will never have a token endpoint. AFAIK, they can't be used | |||
// to generate disposable tokens anyway, but verify and see if this needs to be fixed. |
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.
this is fine
@@ -17,6 +17,8 @@ public class StringMomentoTokenProvider : ICredentialProvider | |||
public string ControlEndpoint { get; private set; } | |||
/// <inheritdoc /> | |||
public string CacheEndpoint { get; private set; } | |||
/// <inheritdoc /> | |||
public string TokenEndpoint { get; private set; } |
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.
where does this get set?
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.
Good catch, thanks. It gets set in b75af12 :-)
This commit adds an auth client that is currently solely responsible for generating disposable tokens.