com.okta.idx.sdk.api.response.ErrorResponse Maven / Gradle / Ivy
/*
* Copyright (c) 2020-Present, Okta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.okta.idx.sdk.api.response;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.okta.idx.sdk.api.model.Messages;
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class ErrorResponse {
private static final ObjectMapper objectMapper = new ObjectMapper()
.enable(SerializationFeature.INDENT_OUTPUT)
.setSerializationInclusion(JsonInclude.Include.NON_NULL);
private String stateHandle;
private String version;
private String expiresAt;
private String intent;
private Messages messages;
private String error;
@JsonAlias("error_description")
private String errorDescription;
public String getStateHandle() {
return stateHandle;
}
public String getVersion() {
return version;
}
public String getExpiresAt() {
return expiresAt;
}
public String getIntent() {
return intent;
}
public Messages getMessages() {
return messages;
}
public void setMessages(Messages messages) {
this.messages = messages;
}
public String getError() {
return error;
}
public String getErrorDescription() {
return errorDescription;
}
public String raw() throws JsonProcessingException {
return objectMapper.writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy