google-auth-library-java icon indicating copy to clipboard operation
google-auth-library-java copied to clipboard

add validation to ensure ImpersonatedCredential can only be SA or User Credentials

Open zhumin8 opened this issue 1 year ago • 0 comments

This line in javadoc specifies ImpersonatedCredential can only be SA or User Credentials in this create() method, but it is not enforced.

https://github.com/googleapis/google-auth-library-java/blob/a8d466f3951686ddf0f6a7ae429cab505b337c54/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java#L120

For context: https://github.com/googleapis/google-auth-library-java/pull/1566#discussion_r1882521720

zhumin8 avatar Dec 17 '24 20:12 zhumin8