org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl

## Class RemoteOAuthValidator

- java.lang.Object
- - org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl.RemoteOAuthValidator

- All Implemented Interfaces:
    OAuth2TokenValidator

      public class RemoteOAuthValidator
      extends Object
      implements OAuth2TokenValidator

  Handles the OAuth2 token validation from remote IS servers using remote OAuthValidation service-stub.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteOAuthValidator(String hostURL, String adminUsername, String adminPassword, Properties properties)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `OAuthValidationResponse` | `validateToken(String accessToken, String resource)` This method gets a string accessToken and validates it and generate the OAuthValidationResponse containing the validity and user details if valid.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RemoteOAuthValidator

          public RemoteOAuthValidator(String hostURL,
                              String adminUsername,
                              String adminPassword,
                              Properties properties)

  - ### Method Detail

    - #### validateToken

          public OAuthValidationResponse validateToken(String accessToken,
                                              String resource)
                                                throws OAuthTokenValidationException

      Description copied from interface: `OAuth2TokenValidator`
      This method gets a string accessToken and validates it and generate the OAuthValidationResponse containing the validity and user details if valid.
      Specified by:
        `validateToken` in interface `OAuth2TokenValidator`
      Parameters:
        `accessToken` - which need to be validated.
        `resource` - which need to be validated.
      Returns:
        OAuthValidationResponse with the validated results.
      Throws:
        `OAuthTokenValidationException`

Copyright © 2017 WSO2. All rights reserved.