Class AbstractGoogleIdTokenJUnit

  • Direct Known Subclasses:
    GoogleIdTokenExtension, GoogleIdTokenRule

    public class AbstractGoogleIdTokenJUnit
    extends java.lang.Object
    Abstract JUnit mocking the GoogleIdTokenVerifier.
    Author:
    Daniel Sagenschneider
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier getGoogleIdTokenVerifier()
      Obtains the GoogleIdTokenVerifier.
      java.lang.String getMockIdToken​(java.lang.String googleId, java.lang.String email, java.lang.String... nameValuePairs)
      Generates a mock GoogleIdToken string.
      protected void setupMockTokens()
      Setups to use mock tokens.
      protected void tearDownMockTokens()
      Tears down using the mock tokens.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractGoogleIdTokenJUnit

        public AbstractGoogleIdTokenJUnit()
    • Method Detail

      • getMockIdToken

        public java.lang.String getMockIdToken​(java.lang.String googleId,
                                               java.lang.String email,
                                               java.lang.String... nameValuePairs)
        Generates a mock GoogleIdToken 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 the GoogleIdTokenVerifier.
        Returns:
        GoogleIdTokenVerifier.
      • setupMockTokens

        protected void setupMockTokens()
        Setups to use mock tokens.
      • tearDownMockTokens

        protected void tearDownMockTokens()
        Tears down using the mock tokens.