Class DeviceAuthorizationAction
- java.lang.Object
-
- io.jans.as.server.authorize.ws.rs.DeviceAuthorizationAction
-
- All Implemented Interfaces:
java.io.Serializable
@Named @RequestScoped public class DeviceAuthorizationAction extends java.lang.Object implements java.io.Serializable
Action used to process all requests related to device authorization.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeviceAuthorizationAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCode()
java.lang.String
getDescriptionMsg()
java.lang.String
getError()
java.lang.String
getErrorDescription()
java.lang.String
getSessionId()
java.lang.String
getSessionState()
java.lang.String
getState()
java.lang.String
getTitleMsg()
java.lang.String
getUserCode()
java.lang.String
getUserCodePart1()
java.lang.String
getUserCodePart2()
void
initializeSession()
Reset data in session or create a new one whether there is no session.boolean
isCompleteVerificationMode()
Checks if page should be shown in complete verification mode, it means that the user code has been shared by the url.boolean
isDeviceAuthnCompleted()
Checks if the authorization is complete and page should show confirmation to the end-user.boolean
isErrorResponse()
Checks if page should show error messages.boolean
isNewRequest()
Checks if page is loaded for a new device request.void
pageLoaded()
Method used by the view to load all query params and set the page state.void
processUserCodeVerification()
Processes user code introduced or loaded in the veritification page and redirects whether user code is correct or return an error if there is something wrong.void
setCode(java.lang.String code)
void
setDescriptionMsg(java.lang.String descriptionMsg)
void
setError(java.lang.String error)
void
setErrorDescription(java.lang.String errorDescription)
void
setSessionId(java.lang.String sessionId)
void
setSessionState(java.lang.String sessionState)
void
setState(java.lang.String state)
void
setTitleMsg(java.lang.String titleMsg)
void
setUserCode(java.lang.String userCode)
void
setUserCodePart1(java.lang.String userCodePart1)
void
setUserCodePart2(java.lang.String userCodePart2)
-
-
-
Method Detail
-
pageLoaded
public void pageLoaded()
Method used by the view to load all query params and set the page state.
-
initializeSession
public void initializeSession()
Reset data in session or create a new one whether there is no session.
-
processUserCodeVerification
public void processUserCodeVerification()
Processes user code introduced or loaded in the veritification page and redirects whether user code is correct or return an error if there is something wrong.
-
isNewRequest
public boolean isNewRequest()
Checks if page is loaded for a new device request.
-
isErrorResponse
public boolean isErrorResponse()
Checks if page should show error messages.
-
isCompleteVerificationMode
public boolean isCompleteVerificationMode()
Checks if page should be shown in complete verification mode, it means that the user code has been shared by the url.
-
isDeviceAuthnCompleted
public boolean isDeviceAuthnCompleted()
Checks if the authorization is complete and page should show confirmation to the end-user.
-
getUserCodePart1
public java.lang.String getUserCodePart1()
-
setUserCodePart1
public void setUserCodePart1(java.lang.String userCodePart1)
-
getUserCodePart2
public java.lang.String getUserCodePart2()
-
setUserCodePart2
public void setUserCodePart2(java.lang.String userCodePart2)
-
getCode
public java.lang.String getCode()
-
setCode
public void setCode(java.lang.String code)
-
getSessionId
public java.lang.String getSessionId()
-
setSessionId
public void setSessionId(java.lang.String sessionId)
-
getState
public java.lang.String getState()
-
setState
public void setState(java.lang.String state)
-
getSessionState
public java.lang.String getSessionState()
-
setSessionState
public void setSessionState(java.lang.String sessionState)
-
getError
public java.lang.String getError()
-
setError
public void setError(java.lang.String error)
-
getErrorDescription
public java.lang.String getErrorDescription()
-
setErrorDescription
public void setErrorDescription(java.lang.String errorDescription)
-
getUserCode
public java.lang.String getUserCode()
-
setUserCode
public void setUserCode(java.lang.String userCode)
-
getTitleMsg
public java.lang.String getTitleMsg()
-
setTitleMsg
public void setTitleMsg(java.lang.String titleMsg)
-
getDescriptionMsg
public java.lang.String getDescriptionMsg()
-
setDescriptionMsg
public void setDescriptionMsg(java.lang.String descriptionMsg)
-
-