Class MockCcureAuth

java.lang.Object
edu.internet2.middleware.grouper.app.ccure.MockCcureAuth

public class MockCcureAuth extends Object
Model object for a CCure mock login session (session-id / token pair returned by api/Authenticate/Login, validated by api/Authenticate/Logout). This is persisted (rather than kept in a static field) because the mock service handler is instantiated fresh per request and Grouper's UI/WS/daemon layers can run as multiple nodes - a login and its matching logout are not guaranteed to land on the same JVM.
  • Constructor Details

    • MockCcureAuth

      public MockCcureAuth()
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getSessionId

      public String getSessionId()
    • setSessionId

      public void setSessionId(String sessionId)
    • getAccessToken

      public String getAccessToken()
    • setAccessToken

      public void setAccessToken(String accessToken)
    • getCreatedAtMillis

      public Long getCreatedAtMillis()
    • setCreatedAtMillis

      public void setCreatedAtMillis(Long createdAtMillis)
    • newSession

      public static MockCcureAuth newSession()
      Build a new session row with a freshly generated id, session id, and access token.
      Returns:
      the new (unsaved) auth row
    • createTableCcureAuth

      public static void createTableCcureAuth(DdlVersionBean ddlVersionBean, Database database)
      DDL for the mock table.
      Parameters:
      ddlVersionBean - ddl version bean
      database - database