Skip to content

Commit

Permalink
Fixed bad docs url references.
Browse files Browse the repository at this point in the history
#208

(cherry picked from commit dd91aed)
  • Loading branch information
yuriyz committed Jul 11, 2018
1 parent 36cc2c3 commit fb469ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions oxd-common/src/main/java/org/xdi/oxd/common/CoreUtils.java
Expand Up @@ -47,6 +47,8 @@
*/
public class CoreUtils {

public static final String DOC_URL = "https://gluu.org/docs/oxd";

public static boolean isExpired(Date expiredAt) {
return expiredAt != null && expiredAt.before(new Date());
}
Expand Down
Expand Up @@ -57,8 +57,8 @@ public enum ErrorResponseCode {
NO_CONNECT_DISCOVERY_RESPONSE("no_connect_discovery_response", "Unable to fetch Connect discovery response /.well-known/openid-configuration"),
NO_REGISTRATION_ENDPOINT("invalid_request", "OP does not support dynamic client registration. Please register client manually and provide client_id and client_secret to register_site command."),
NO_UMA_DISCOVERY_RESPONSE("no_uma_discovery_response", "Unable to fetch UMA discovery response /.well-known/uma2-configuration"),
NO_UMA_RESOURCES_TO_PROTECT("invalid_uma_request", "Resources list to protect is empty or blank. Please check it according to protocol definition at https://www.gluu.org/docs-oxd"),
NO_UMA_HTTP_METHOD("invalid_http_method", "http_method is not specified or otherwise not GET or POST or PUT or DELETE. Please check it according to protocol definition at https://www.gluu.org/docs-oxd"),
NO_UMA_RESOURCES_TO_PROTECT("invalid_uma_request", "Resources list to protect is empty or blank. Please check it according to protocol definition at " + CoreUtils.DOC_URL),
NO_UMA_HTTP_METHOD("invalid_http_method", "http_method is not specified or otherwise not GET or POST or PUT or DELETE. Please check it according to protocol definition at " + CoreUtils.DOC_URL),
NO_UMA_PATH_PARAMETER("invalid_path_parameter", "path parameter is not specified or otherwise not valid"),
NO_UMA_TICKET_PARAMETER("invalid_ticket_parameter", "ticket parameter is not specified or otherwise is not valid"),
NO_UMA_CLAIMS_REDIRECT_URI_PARAMETER("invalid_claims_redirect_uri_parameter", "claims_redirect_uri parameter is not specified or otherwise is not valid"),
Expand Down
Expand Up @@ -52,7 +52,7 @@ public CommandResponse execute(final RsCheckAccessParams params) throws Exceptio
if (resource == null) {
final ErrorResponse error = new ErrorResponse("invalid_request");
error.setErrorDescription("Resource is not protected with path: " + params.getPath() + " and httpMethod: " + params.getHttpMethod() +
". Please protect your resource first with uma_rs_protect command. Check details on " + ConfigurationService.DOC_URL);
". Please protect your resource first with uma_rs_protect command. Check details on " + CoreUtils.DOC_URL);
LOG.error(error.getErrorDescription());
return CommandResponse.error().setData(new POJONode(error));
}
Expand Down

0 comments on commit fb469ed

Please sign in to comment.