org.keycloak.protocol

## Class RestartLoginCookie

- java.lang.Object
- - org.keycloak.protocol.RestartLoginCookie

- All Implemented Interfaces:
    Token

      public class RestartLoginCookie
      extends Object
      implements Token

  This is an an encoded token that is stored as a cookie so that if there is a client timeout, then the authentication session can be restarted.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `action`
    `protected String` | `authMethod`
    `protected String` | `clientId`
    `protected String` | `cs` Deprecated.
    `static String` | `KC_RESTART`
    `protected Map<String,String>` | `notes`
    `protected String` | `redirectUri`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RestartLoginCookie()`
    `RestartLoginCookie(AuthenticationSessionModel authSession)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `expireRestartCookie(RealmModel realm, ClientConnection connection, javax.ws.rs.core.UriInfo uriInfo)`
    `String` | `getAction()`
    `String` | `getAuthMethod()`
    `TokenCategory` | `getCategory()`
    `String` | `getClientId()`
    `Map<String,String>` | `getNotes()`
    `String` | `getRedirectUri()`
    `static AuthenticationSessionModel` | `restartSession(KeycloakSession session, RealmModel realm, RootAuthenticationSessionModel rootSession, String expectedClientId)`
    `void` | `setAction(String action)`
    `void` | `setAuthMethod(String authMethod)`
    `void` | `setClientId(String clientId)`
    `void` | `setNotes(Map<String,String> notes)`
    `void` | `setRedirectUri(String redirectUri)`
    `static void` | `setRestartCookie(KeycloakSession session, RealmModel realm, ClientConnection connection, javax.ws.rs.core.UriInfo uriInfo, AuthenticationSessionModel authSession)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KC_RESTART

          public static final String KC_RESTART

      See Also:
        Constant Field Values

    - #### clientId

          protected String clientId

    - #### authMethod

          protected String authMethod

    - #### redirectUri

          protected String redirectUri

    - #### action

          protected String action

    - #### notes

          protected Map<String,String> notes

    - #### cs

          @Deprecated
          protected String cs

      Deprecated.

  - ### Constructor Detail

    - #### RestartLoginCookie

          public RestartLoginCookie()

    - #### RestartLoginCookie

          public RestartLoginCookie(AuthenticationSessionModel authSession)

  - ### Method Detail

    - #### getNotes

          public Map<String,String> getNotes()

    - #### setNotes

          public void setNotes(Map<String,String> notes)

    - #### getClientId

          public String getClientId()

    - #### setClientId

          public void setClientId(String clientId)

    - #### getAuthMethod

          public String getAuthMethod()

    - #### setAuthMethod

          public void setAuthMethod(String authMethod)

    - #### getRedirectUri

          public String getRedirectUri()

    - #### setRedirectUri

          public void setRedirectUri(String redirectUri)

    - #### getAction

          public String getAction()

    - #### setAction

          public void setAction(String action)

    - #### setRestartCookie

          public static void setRestartCookie(KeycloakSession session,
                                              RealmModel realm,
                                              ClientConnection connection,
                                              javax.ws.rs.core.UriInfo uriInfo,
                                              AuthenticationSessionModel authSession)

    - #### expireRestartCookie

          public static void expireRestartCookie(RealmModel realm,
                                                 ClientConnection connection,
                                                 javax.ws.rs.core.UriInfo uriInfo)

    - #### restartSession

          public static AuthenticationSessionModel restartSession(KeycloakSession session,
                                                                  RealmModel realm,
                                                                  RootAuthenticationSessionModel rootSession,
                                                                  String expectedClientId)
                                                           throws Exception

      Throws:
        `Exception`

    - #### getCategory

          public TokenCategory getCategory()

      Specified by:
        `getCategory` in interface `Token`

Copyright © 2021 JBoss by Red Hat. All rights reserved.