Package com.ocient.auth
Class OpenIDAuthenticators.DeviceAuthorizationGrant<T extends Token>
java.lang.Object
com.ocient.auth.OpenIDAuthenticators.DeviceAuthorizationGrant<T>
- Enclosing class:
OpenIDAuthenticators
The Device Authorization Grant is an extension that enables devices with no browser or limited
input capability to use OAuth.
-
Constructor Summary
ConstructorsConstructorDescriptionDeviceAuthorizationGrant(String verificationUriComplete, String verificationUri, String userCode, OpenIDAuthenticators.TokenPoller<T> getToken) -
Method Summary
Modifier and TypeMethodDescriptiongetToken(long timeoutMillis) Polls the issuer's /token endpoint for the authorization response.
-
Constructor Details
-
DeviceAuthorizationGrant
public DeviceAuthorizationGrant(String verificationUriComplete, String verificationUri, String userCode, OpenIDAuthenticators.TokenPoller<T> getToken)
-
-
Method Details
-
getUserCode
-
getVerificationURI
-
getVerificationURIComplete
-
getToken
public T getToken(long timeoutMillis) throws AuthException, KeyManagementException, IOException, NoSuchAlgorithmException, KeyStoreException, InterruptedException, TimeoutException Polls the issuer's /token endpoint for the authorization response.- Parameters:
timeoutMillis- the number of milliseconds before the request should time out- Returns:
Token- Throws:
AuthException- when any exception occursKeyManagementExceptionIOExceptionNoSuchAlgorithmExceptionKeyStoreExceptionInterruptedExceptionTimeoutException
-