Package org.keycloak.models
Class DefaultOAuth2DeviceUserCodeProvider
java.lang.Object
org.keycloak.models.DefaultOAuth2DeviceUserCodeProvider
- All Implemented Interfaces:
OAuth2DeviceUserCodeProvider
,Provider
public class DefaultOAuth2DeviceUserCodeProvider
extends Object
implements OAuth2DeviceUserCodeProvider
The default implementation for generating/formatting user code of OAuth 2.0 Device Authorization Grant.
For generation, uppercase eight-letter format is used.
For display, uppercase four-letters dashes four-letters format is used.
- Author:
- Hiroyuki Wada
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DefaultOAuth2DeviceUserCodeProvider
public DefaultOAuth2DeviceUserCodeProvider()
-
-
Method Details
-
generate
Description copied from interface:OAuth2DeviceUserCodeProvider
Generate a new user code for OAuth 2.0 Device Authorization Grant.- Specified by:
generate
in interfaceOAuth2DeviceUserCodeProvider
- Returns:
- Return a generated user code
-
display
Description copied from interface:OAuth2DeviceUserCodeProvider
Get human-readability user code from original user code.- Specified by:
display
in interfaceOAuth2DeviceUserCodeProvider
- Parameters:
userCode
- Original user code- Returns:
- Return a human-readability user code
-
format
Description copied from interface:OAuth2DeviceUserCodeProvider
Format inputted user code.- Specified by:
format
in interfaceOAuth2DeviceUserCodeProvider
- Parameters:
userCode
- Inputted user code.- Returns:
-
close
public void close()
-