Interface OAuth2DeviceTokenStoreProvider

    • Method Detail

      • getByDeviceCode

        OAuth2DeviceCodeModel getByDeviceCode​(RealmModel realm,
                                              String deviceCode)
        Get the model object by the given device code
        Parameters:
        realm -
        deviceCode -
        Returns:
      • isPollingAllowed

        boolean isPollingAllowed​(OAuth2DeviceCodeModel deviceCode)
        Check the device code is allowed to poll
        Parameters:
        deviceCode -
        Returns:
        Return true if the given device code is allowed to poll
      • approve

        boolean approve​(RealmModel realm,
                        String userCode,
                        String userSessionId,
                        Map<String,​String> additionalParams)
        Approve the given user code
        Parameters:
        realm -
        userCode -
        userSessionId -
        Returns:
        Return true if approving successful. If the code is already expired and cleared, it returns false.
      • deny

        boolean deny​(RealmModel realm,
                     String userCode)
        Deny the given user code
        Parameters:
        realm -
        userCode -
        Returns:
        Return true if denying successful. If the code is already expired and cleared, it returns false.
      • removeDeviceCode

        boolean removeDeviceCode​(RealmModel realm,
                                 String deviceCode)
        Remove the given device code
        Parameters:
        realm -
        deviceCode -
        Returns:
        Return true if removing successful. If the code is already expired and cleared, it returns false.
      • removeUserCode

        boolean removeUserCode​(RealmModel realm,
                               String userCode)
        Remove the given user code
        Parameters:
        realm -
        userCode -
        Returns:
        Return true if removing successful. If the code is already expired and cleared, it returns false.