/*
* Copyright 2015 Open mHealth
*
* 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 org.openmhealth.shim;
import org.springframework.data.annotation.Id;
import java.util.Map;
/**
* @author Danilo Bonilla
*/
public class AuthorizationRequestParameters {
@Id
private String id;
private String stateKey;
private String username;
private String redirectUri;
private Map<String, String> requestParams;
private String authorizationUrl;
private String clientRedirectUrl;
private boolean isAuthorized = false;
private byte[] serializedRequest;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public boolean getIsAuthorized() {
return isAuthorized;
}
public void setAuthorized(boolean isAuthorized) {
this.isAuthorized = isAuthorized;
}
public String getAuthorizationUrl() {
return authorizationUrl;
}
public void setAuthorizationUrl(String authorizationUrl) {
this.authorizationUrl = authorizationUrl;
}
public String getStateKey() {
return stateKey;
}
public void setStateKey(String stateKey) {
this.stateKey = stateKey;
}
public String getRedirectUri() {
return redirectUri;
}
public void setRedirectUri(String redirectUri) {
this.redirectUri = redirectUri;
}
public Map<String, String> getRequestParams() {
return requestParams;
}
public void setRequestParams(Map<String, String> requestParams) {
this.requestParams = requestParams;
}
public byte[] getSerializedRequest() {
return serializedRequest;
}
public void setSerializedRequest(byte[] serializedRequest) {
this.serializedRequest = serializedRequest;
}
public String getClientRedirectUrl() {
return clientRedirectUrl;
}
public void setClientRedirectUrl(String clientRedirectUrl) {
this.clientRedirectUrl = clientRedirectUrl;
}
public static AuthorizationRequestParameters authorized() {
AuthorizationRequestParameters params = new AuthorizationRequestParameters();
params.setAuthorized(true);
return params;
}
}