Class AbstractGoogleIdTokenJUnit
- java.lang.Object
-
- net.officefloor.identity.google.mock.AbstractGoogleIdTokenJUnit
-
- Direct Known Subclasses:
GoogleIdTokenExtension
,GoogleIdTokenRule
public class AbstractGoogleIdTokenJUnit extends java.lang.Object
Abstract JUnit mocking theGoogleIdTokenVerifier
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractGoogleIdTokenJUnit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier
getGoogleIdTokenVerifier()
Obtains theGoogleIdTokenVerifier
.java.lang.String
getMockIdToken(java.lang.String googleId, java.lang.String email, java.lang.String... nameValuePairs)
Generates a mockGoogleIdToken
string.protected void
setupMockTokens()
Setups to use mock tokens.protected void
tearDownMockTokens()
Tears down using the mock tokens.
-
-
-
Method Detail
-
getMockIdToken
public java.lang.String getMockIdToken(java.lang.String googleId, java.lang.String email, java.lang.String... nameValuePairs)
Generates a mockGoogleIdToken
string.- Parameters:
googleId
- Google identifier.email
- Email address.nameValuePairs
- Name/value pairs.- Returns:
GoogleIdToken
string.
-
getGoogleIdTokenVerifier
public com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier getGoogleIdTokenVerifier()
Obtains theGoogleIdTokenVerifier
.- Returns:
GoogleIdTokenVerifier
.
-
setupMockTokens
protected void setupMockTokens()
Setups to use mock tokens.
-
tearDownMockTokens
protected void tearDownMockTokens()
Tears down using the mock tokens.
-
-