Package org.springframework.security.oauth.consumer

Examples of org.springframework.security.oauth.consumer.InvalidOAuthRealmException


      String authHeaderValue = connection.getHeaderField("WWW-Authenticate");
      if (authHeaderValue != null) {
        Map<String, String> headerEntries = StringSplitUtils.splitEachArrayElementAndCreateMap(StringSplitUtils.splitIgnoringQuotes(authHeaderValue, ','), "=", "\"");
        String requiredRealm = headerEntries.get("realm");
        if ((requiredRealm != null) && (!requiredRealm.equals(realm))) {
          throw new InvalidOAuthRealmException(String.format("Invalid OAuth realm. Provider expects \"%s\", when the resource details specify \"%s\".", requiredRealm, realm), requiredRealm);
        }
      }

      throw new OAuthRequestFailedException("OAuth authentication failed: " + responseMessage);
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.oauth.consumer.InvalidOAuthRealmException

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.