Skip to content

deprecated GoogleGroupChecker constructor seems broken #86

@pvighi

Description

@pvighi

I was encountering NullPointer exceptions when updating the play-googleauth version in our project.

I might be doing something wrong but it seems to me like the deprecated GoogleGroupChecker constructor that takes a GoogleServiceAccount doesn't build an equivalent ServiceAccountCredentials properly.

It sets privateKey and serviceAccountUser`:

def this(googleServiceAccount: GoogleServiceAccount) = {
this(
googleServiceAccount.impersonatedUser,
ServiceAccountCredentials.newBuilder()
.setPrivateKey(googleServiceAccount.privateKey)
.setServiceAccountUser(googleServiceAccount.email)
.build()
)
}

But the GoogleServiceAccount class requires clientEmail to be set (see code here )

It might be that we just should be setting clientEmail instead of, or in addition to serviceAccountUser I'm not sure what the difference is exactly.
I just refactored my code to not use this method anyway so It's not blocking anything on my side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions