Examples of OAuthSystemException


Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

            return OAuthClientResponseFactory
                .createCustomResponse(responseBody, contentType, response.getStatusLine().getStatusCode(),
                    responseClass);
        } catch (Exception e) {
            throw new OAuthSystemException(e);
        }

    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

                hexString.append(Integer.toHexString(0xFF & messageDigest[i]));
            }

            return hexString.toString();
        } catch (Exception e) {
            throw new OAuthSystemException("OAuth Token cannot be generated.", e);
        }
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

        try {
            json = JSONUtils.buildJSON(params);
            message.setBody(json);
            return message;
        } catch (JSONException e) {
            throw new OAuthSystemException(e);
        }
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

    protected Map<ParameterStyle, Class> validators = new HashMap<ParameterStyle, Class>();

    public OAuthValidator instantiateValidator(ParameterStyle ps) throws OAuthSystemException {
        Class clazz = validators.get(ps);
        if (clazz == null) {
            throw new OAuthSystemException("Cannot instantiate a message validator.");
        }
        return (OAuthValidator)OAuthUtils.instantiateClass(clazz);
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

    }

    public TokenExtractor instantiateExtractor(ParameterStyle ps) throws OAuthSystemException {
        Class clazz = extractors.get(ps);
        if (clazz == null) {
            throw new OAuthSystemException("Cannot instantiate a token extractor.");
        }
        return (TokenExtractor)OAuthUtils.instantiateClass(clazz);
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

    public static <T> T instantiateClass(Class<T> clazz) throws OAuthSystemException {
        try {
            return (T)clazz.newInstance();
        } catch (Exception e) {
            throw new OAuthSystemException(e);
        }
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

                return clazzConstructor.newInstance(paramValues);
            }
            return clazz.newInstance();

        } catch (NoSuchMethodException e) {
            throw new OAuthSystemException(e);
        } catch (InstantiationException e) {
            throw new OAuthSystemException(e);
        } catch (IllegalAccessException e) {
            throw new OAuthSystemException(e);
        } catch (InvocationTargetException e) {
            throw new OAuthSystemException(e);
        }

    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

    }

    public static ResourceServer instantiateResourceServer(TokenType tokenType) throws OAuthSystemException {
        Class clazz = tokens.get(tokenType);
        if (clazz == null) {
            throw new OAuthSystemException("Cannot instantiate a resource server.");
        }
        return (ResourceServer)OAuthUtils.instantiateClass(clazz);
    }
View Full Code Here

Examples of org.apache.amber.oauth2.common.exception.OAuthSystemException

                }

                responseBody = OAuthUtils.saveStreamAsString(inputStream);
            }
        } catch (IOException e) {
            throw new OAuthSystemException(e);
        }

        return OAuthClientResponseFactory
            .createCustomResponse(responseBody, c.getContentType(), responseCode, responseClass);
    }
View Full Code Here

Examples of org.apache.oltu.oauth2.common.exception.OAuthSystemException

        try {
            json = JSONUtils.buildJSON(params);
            message.setBody(json);
            return message;
        } catch (JSONException e) {
            throw new OAuthSystemException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.