Examples of OpenIdException


Examples of com.data2semantics.yasgui.shared.exceptions.OpenIdException

      userDetails.setUserId(result.getInt("Id"));
      userDetails.setFullName(result.getString("FullName"));
      userDetails.setNickName(result.getString("NickName"));
      userDetails.setEmail(result.getString("Email"));
    } else {
      throw new OpenIdException("User not found in database");
    }
    result.close();
    return userDetails;
  }
View Full Code Here

Examples of com.data2semantics.yasgui.shared.exceptions.OpenIdException

    if (result.next()) {
      userId = result.getInt("Id");
      result.close();
    } else {
      result.close();
      throw new OpenIdException("User does not exist in database");
    }
    return userId;
  }
View Full Code Here

Examples of org.apache.shiro.openid4j.OpenIdException

            AttributeDefinition ad = toDefinition(name, config);

            try {
                fetch.addAttribute(ad.getName(), ad.getUri(), ad.isRequired(), ad.getCount());
            } catch (MessageException e) {
                throw new OpenIdException("Unable to correctly add 'fetch' attribute.", e);
            }
        }

        return fetch;
    }
View Full Code Here

Examples of org.expressme.openid.OpenIdException

  /**
   * Taken from org.expressme.openid.MainServlet
   */
  private void checkNonce(String nonce) {
    // check response_nonce to prevent replay-attack:
    if (nonce==null || nonce.length()<20) throw new OpenIdException("Verify failed.");
    long nonceTime = getNonceTime(nonce);
    long diff = System.currentTimeMillis() - nonceTime;
    if (diff < 0) diff = (-diff);
    if (diff > ONE_HOUR) throw new OpenIdException("Bad nonce time.");
    if (isNonceExist(nonce)) throw new OpenIdException("Verify nonce failed.");
    storeNonce(nonce, nonceTime + TWO_HOUR);
  }
View Full Code Here

Examples of org.expressme.openid.OpenIdException

   */
  private long getNonceTime(String nonce) {
    try {
      return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").parse(nonce.substring(0,19)+"+0000").getTime();
    } catch(ParseException e) {
      throw new OpenIdException("Bad nonce time.");
    }
  }
View Full Code Here

Examples of org.hoteia.qalingo.core.service.openid.OpenIdException

  }
    
    void checkNonce(String nonce) {
        // check response_nonce to prevent replay-attack:
        if (nonce==null || nonce.length()<20){
            throw new OpenIdException("Verify failed.");
        }
        // make sure the time of server is correct:
        long nonceTime = getNonceTime(nonce);
        long diff = Math.abs(System.currentTimeMillis() - nonceTime);
        if (diff > Constants.ONE_HOUR){
            throw new OpenIdException("Bad nonce time.");
        }
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.service.openid.OpenIdException

            return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
                    .parse(nonce.substring(0, 19) + "+0000")
                    .getTime();
        }
        catch(ParseException e) {
            throw new OpenIdException("Bad nonce time.");
        }
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.service.openid.OpenIdException

  }
    
    void checkNonce(String nonce) {
        // check response_nonce to prevent replay-attack:
        if (nonce==null || nonce.length()<20){
            throw new OpenIdException("Verify failed.");
        }
        // make sure the time of server is correct:
        long nonceTime = getNonceTime(nonce);
        long diff = Math.abs(System.currentTimeMillis() - nonceTime);
        if (diff > Constants.ONE_HOUR){
            throw new OpenIdException("Bad nonce time.");
        }
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.service.openid.OpenIdException

            return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
                    .parse(nonce.substring(0, 19) + "+0000")
                    .getTime();
        }
        catch(ParseException e) {
            throw new OpenIdException("Bad nonce time.");
        }
    }
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.