Package com.authlete.jaxrs
Class DeviceAuthorizationPageModel
- java.lang.Object
-
- com.authlete.jaxrs.DeviceAuthorizationPageModel
-
- All Implemented Interfaces:
Serializable
public class DeviceAuthorizationPageModel extends Object implements Serializable
Model class to hold data which are referred to in an authorization page in device flow.Feel free to extend this class as necessary.
- Since:
- 2.18
- Author:
- Hideki Ikeda
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeviceAuthorizationPageModel()The default constructor with default values.DeviceAuthorizationPageModel(com.authlete.common.dto.DeviceVerificationResponse info)Create anDeviceAuthorizationPageModelinstance using information contained in anDeviceVerificationResponseobject, which represents a response from Authlete's/api/device/verificationAPI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetClientId()Get the client ID of the client application to which the user code has been issued.StringgetClientIdAlias()Get the client ID alias of the client application to which the user code has been issued.StringgetClientIdentifier()Get the client identifier used in the device authorization request for the user code.StringgetClientName()Get the name of the client application.com.authlete.common.dto.Scope[]getScopes()Get the list of scopes requested by the device authorization request for the user code.booleanisClientIdAliasUsed()Get the flag which indicates whether the client ID alias was used in the device authorization request for the user code.DeviceAuthorizationPageModelsetClientId(long clientId)Set the client ID of the client application to which the user code has been issued.DeviceAuthorizationPageModelsetClientIdAlias(String alias)Set the client ID alias of the client application to which the user code has been issued.DeviceAuthorizationPageModelsetClientIdAliasUsed(boolean used)Set the flag which indicates whether the client ID alias was used in the device authorization request for the user code.DeviceAuthorizationPageModelsetClientName(String clientName)Set the name of the client application.DeviceAuthorizationPageModelsetScopes(com.authlete.common.dto.Scope[] scopes)Set the list of scopes requested by the device authorization request for the user code.
-
-
-
Constructor Detail
-
DeviceAuthorizationPageModel
public DeviceAuthorizationPageModel()
The default constructor with default values.
-
DeviceAuthorizationPageModel
public DeviceAuthorizationPageModel(com.authlete.common.dto.DeviceVerificationResponse info)
Create anDeviceAuthorizationPageModelinstance using information contained in anDeviceVerificationResponseobject, which represents a response from Authlete's/api/device/verificationAPI.- Parameters:
info- AnDeviceVerificationResponseobject, which represents a response from Authlete's/api/device/verificationAPI.
-
-
Method Detail
-
getClientId
public long getClientId()
Get the client ID of the client application to which the user code has been issued.- Returns:
- The client ID of the client application.
-
setClientId
public DeviceAuthorizationPageModel setClientId(long clientId)
Set the client ID of the client application to which the user code has been issued.- Parameters:
clientId- The client ID of the client application.- Returns:
thisobject.
-
getClientIdAlias
public String getClientIdAlias()
Get the client ID alias of the client application to which the user code has been issued.- Returns:
- The client ID alias of the client application.
-
setClientIdAlias
public DeviceAuthorizationPageModel setClientIdAlias(String alias)
Set the client ID alias of the client application to which the user code has been issued.- Parameters:
alias- The client ID alias of the client application.- Returns:
thisobject.
-
isClientIdAliasUsed
public boolean isClientIdAliasUsed()
Get the flag which indicates whether the client ID alias was used in the device authorization request for the user code.- Returns:
trueif the client ID alias was used in the request.
-
setClientIdAliasUsed
public DeviceAuthorizationPageModel setClientIdAliasUsed(boolean used)
Set the flag which indicates whether the client ID alias was used in the device authorization request for the user code.- Parameters:
used-trueto indicate that the client ID alias was used in the request.- Returns:
thisobject.
-
getClientIdentifier
public String getClientIdentifier()
Get the client identifier used in the device authorization request for the user code.When
isClientIdAliasUsed()returnstrue, this method returns the same value asgetClientIdAlias()does. Otherwise, this method returns the string representation of the value returned fromgetClientId().- Returns:
- The client identifier used in the device authorization request for the user code.
-
getClientName
public String getClientName()
Get the name of the client application.- Returns:
- The name of the client application.
-
setClientName
public DeviceAuthorizationPageModel setClientName(String clientName)
Set the name of the client application.- Parameters:
clientName- The name of the client application.- Returns:
thisobject.
-
getScopes
public com.authlete.common.dto.Scope[] getScopes()
Get the list of scopes requested by the device authorization request for the user code.- Returns:
- The list of requested scopes.
-
setScopes
public DeviceAuthorizationPageModel setScopes(com.authlete.common.dto.Scope[] scopes)
Set the list of scopes requested by the device authorization request for the user code.- Parameters:
scopes- The list of requested scopes.- Returns:
thisobject.
-
-