Package org.agorava.api.oauth

Examples of org.agorava.api.oauth.OAuthSession


        return globalRepository.get(repo.getId());
    }

    @Override
    public OAuthSession resolveSessionForQualifier(Annotation qualifier) {
        OAuthSession current = getCurrentSession();
        if (current.getServiceQualifier().equals(qualifier)) {
            return current;
        }
        if (getCurrentRepository().getCurrent().equals(OAuthSession.NULL)) {
            buildSessionFor(qualifier);
        } else if (!getCurrentRepository().getCurrent().getServiceQualifier().equals(qualifier)) {
View Full Code Here


        return getCurrentRepository().getCurrent();
    }

    @Override
    public String startDanceFor(String providerName, String internalCallBack) {
        OAuthSession session = buildSessionFor(providerName);
        if (internalCallBack != null && !"".equals(internalCallBack.trim())) {
            session.getExtraData().put(AgoravaConstants.INTERN_CALLBACK_PARAM, internalCallBack);
        }
        return getCurrentService().getAuthorizationUrl();
    }
View Full Code Here

    protected OAuthSession resolveOAuthSession(InjectionPoint ip, @Current UserSessionRepository repository) {
        if (ip == null) {
            throw new UnsupportedOperationException("Cannot resolve session for a null InjectionPoint");
        }
        Annotation qual = AnnotationUtils.getSingleProviderRelatedQualifier(ip.getQualifiers(), false);
        OAuthSession res = repository.getForProvider(qual);
        if (res.isNull()) {
            throw new AgoravaException("There's no active session for requested provider");
        }
        return res;
    }
View Full Code Here

    }

    @PostConstruct
    protected void init() {
        UserSessionRepository r;
        OAuthSession s;

        s = globalRepository.getOauthSession(getSessionId());
        if (s != null) {
            currentSession = s;
            currentRepo = s.getRepo();

        } else {
            r = globalRepository.get(getRepoId());
            if (r != null) {
                currentRepo = r;
View Full Code Here

TOP

Related Classes of org.agorava.api.oauth.OAuthSession

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.