Package org.gatein.api.oauth.exception

Examples of org.gatein.api.oauth.exception.OAuthApiException


                return null;
            } else {
                return new AccessTokenImpl(accessTokenContext);
            }
        } catch (OAuthException oauthEx) {
            throw new OAuthApiException(translateExceptionCode(oauthEx.getExceptionCode()), oauthEx.getMessage(), oauthEx);
        }
    }
View Full Code Here


        AccessTokenContext accessTokenContext = getInternalAccessTokenContext(accessToken);

        try {
            this.socialNetworkService.updateOAuthAccessToken(this.internalOAuthProvider, username, accessTokenContext);
        } catch (OAuthException oauthEx) {
            throw new OAuthApiException(translateExceptionCode(oauthEx.getExceptionCode()), oauthEx.getMessage(), oauthEx);
        }
    }
View Full Code Here

    @Override
    public void removeAccessToken(String username) throws OAuthApiException {
        try {
            this.socialNetworkService.removeOAuthAccessToken(this.internalOAuthProvider, username);
        } catch (OAuthException oauthEx) {
            throw new OAuthApiException(translateExceptionCode(oauthEx.getExceptionCode()), oauthEx.getMessage(), oauthEx);
        }
    }
View Full Code Here

    }


    @Override
    public void startOAuthWorkflow(String neededCustomScope) throws OAuthApiException, IOException {
        throw new OAuthApiException(OAuthApiExceptionCode.OTHER_ERROR, "Not supported for this implementation");
    }
View Full Code Here

        AccessTokenContext accessTokenContext = getInternalAccessTokenContext(accessToken);

        try {
            accessTokenContext = this.internalOAuthProvider.getOauthProviderProcessor().validateTokenAndUpdateScopes(accessTokenContext);
        } catch (OAuthException oauthEx) {
            throw new OAuthApiException(translateExceptionCode(oauthEx.getExceptionCode()), oauthEx.getMessage(), oauthEx);
        }

        return new AccessTokenImpl(accessTokenContext);
    }
View Full Code Here

        AccessTokenContext accessTokenContext = getInternalAccessTokenContext(accessToken);

        try {
            this.internalOAuthProvider.getOauthProviderProcessor().revokeToken(accessTokenContext);
        } catch (OAuthException oauthEx) {
            throw new OAuthApiException(translateExceptionCode(oauthEx.getExceptionCode()), oauthEx.getMessage(), oauthEx);
        }
    }
View Full Code Here

    public <T> T getAuthorizedSocialApiObject(AccessToken accessToken, Class<T> socialApiObjectType) throws OAuthApiException {
        AccessTokenContext accessTokenContext = getInternalAccessTokenContext(accessToken);
        T socialApiObject = (T)this.internalOAuthProvider.getOauthProviderProcessor().getAuthorizedSocialApiObject(accessTokenContext, socialApiObjectType);

        if (socialApiObject == null) {
            throw new OAuthApiException(OAuthApiExceptionCode.SOCIAL_API_OBJECT_NOT_FOUND,
                    "Class '" + socialApiObjectType + "' not supported by processor " + this.internalOAuthProvider.getOauthProviderProcessor());
        }

        return socialApiObject;
    }
View Full Code Here

TOP

Related Classes of org.gatein.api.oauth.exception.OAuthApiException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.