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 anDeviceAuthorizationPageModel
instance using information contained in anDeviceVerificationResponse
object, which represents a response from Authlete's/api/device/verification
API.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getClientId()
Get the client ID of the client application to which the user code has been issued.String
getClientIdAlias()
Get the client ID alias of the client application to which the user code has been issued.String
getClientIdentifier()
Get the client identifier used in the device authorization request for the user code.String
getClientName()
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.boolean
isClientIdAliasUsed()
Get the flag which indicates whether the client ID alias was used in the device authorization request for the user code.DeviceAuthorizationPageModel
setClientId(long clientId)
Set the client ID of the client application to which the user code has been issued.DeviceAuthorizationPageModel
setClientIdAlias(String alias)
Set the client ID alias of the client application to which the user code has been issued.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.DeviceAuthorizationPageModel
setClientName(String clientName)
Set the name of the client application.DeviceAuthorizationPageModel
setScopes(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 anDeviceAuthorizationPageModel
instance using information contained in anDeviceVerificationResponse
object, which represents a response from Authlete's/api/device/verification
API.- Parameters:
info
- AnDeviceVerificationResponse
object, which represents a response from Authlete's/api/device/verification
API.
-
-
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:
this
object.
-
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:
this
object.
-
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:
true
if 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
-true
to indicate that the client ID alias was used in the request.- Returns:
this
object.
-
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:
this
object.
-
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:
this
object.
-
-