@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode()); return hashCode; }
/** * <p> * A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on * input. * </p> * * @param identityId * A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one * passed on input. * @return Returns a reference to this object so that method calls can be chained together. */ public GetOpenIdTokenResult withIdentityId(String identityId) { setIdentityId(identityId); return this; }
/** * <p> * An OpenID token, valid for 15 minutes. * </p> * * @param token * An OpenID token, valid for 15 minutes. * @return Returns a reference to this object so that method calls can be chained together. */ public GetOpenIdTokenResult withToken(String token) { setToken(token); return this; }
public GetOpenIdTokenResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetOpenIdTokenResult getOpenIdTokenResult = new GetOpenIdTokenResult(); if (context.testExpression("IdentityId", targetDepth)) { context.nextToken(); getOpenIdTokenResult.setIdentityId(context.getUnmarshaller(String.class).unmarshall(context)); getOpenIdTokenResult.setToken(context.getUnmarshaller(String.class).unmarshall(context));
public GetOpenIdTokenResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetOpenIdTokenResult getOpenIdTokenResult = new GetOpenIdTokenResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("IdentityId")) { getOpenIdTokenResult.setIdentityId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Token")) { getOpenIdTokenResult.setToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getOpenIdTokenResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetOpenIdTokenResult == false) return false; GetOpenIdTokenResult other = (GetOpenIdTokenResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getToken() == null ^ this.getToken() == null) return false; if (other.getToken() != null && other.getToken().equals(this.getToken()) == false) return false; return true; }
public GetOpenIdTokenResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetOpenIdTokenResult getOpenIdTokenResult = new GetOpenIdTokenResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("IdentityId")) { getOpenIdTokenResult.setIdentityId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Token")) { getOpenIdTokenResult.setToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getOpenIdTokenResult; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityId() != null) sb.append("IdentityId: ").append(getIdentityId()).append(","); if (getToken() != null) sb.append("Token: ").append(getToken()); sb.append("}"); return sb.toString(); }
public GetOpenIdTokenResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetOpenIdTokenResult getOpenIdTokenResult = new GetOpenIdTokenResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("IdentityId")) { getOpenIdTokenResult.setIdentityId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Token")) { getOpenIdTokenResult.setToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getOpenIdTokenResult; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetOpenIdTokenResult == false) return false; GetOpenIdTokenResult other = (GetOpenIdTokenResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getToken() == null ^ this.getToken() == null) return false; if (other.getToken() != null && other.getToken().equals(this.getToken()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityId() != null) sb.append("IdentityId: " + getIdentityId() + ","); if (getToken() != null) sb.append("Token: " + getToken()); sb.append("}"); return sb.toString(); }
/** * With the logins and identityId to mark the user, it builds a request to * the cognito back end, and returns the token cib hands back */ @Override public String getToken() { if (this.token == null) { GetOpenIdTokenRequest getTokenRequest = new GetOpenIdTokenRequest() .withIdentityId(getIdentityId()).withLogins(loginsMap); appendUserAgent(getTokenRequest, getUserAgent()); GetOpenIdTokenResult getTokenResult = cib .getOpenIdToken(getTokenRequest); if (!getTokenResult.getIdentityId().equals(getIdentityId())) { identityChanged(getTokenResult.getIdentityId()); } this.token = getTokenResult.getToken(); } return token; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getToken() == null) ? 0 : getToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetOpenIdTokenResult == false) return false; GetOpenIdTokenResult other = (GetOpenIdTokenResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getToken() == null ^ this.getToken() == null) return false; if (other.getToken() != null && other.getToken().equals(this.getToken()) == false) return false; return true; } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetOpenIdTokenResult == false) return false; GetOpenIdTokenResult other = (GetOpenIdTokenResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getToken() == null ^ this.getToken() == null) return false; if (other.getToken() != null && other.getToken().equals(this.getToken()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityId() != null) sb.append("IdentityId: " + getIdentityId() + ","); if (getToken() != null) sb.append("Token: " + getToken()); sb.append("}"); return sb.toString(); }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIdentityId() != null) sb.append("IdentityId: " + getIdentityId() + ","); if (getToken() != null) sb.append("Token: " + getToken()); sb.append("}"); return sb.toString(); }
/** * With the logins and identityId to mark the user, it builds a request to * the cognito back end, and returns the token cib hands back */ @Override public String getToken() { if (this.token == null) { GetOpenIdTokenRequest getTokenRequest = new GetOpenIdTokenRequest() .withIdentityId(getIdentityId()).withLogins(loginsMap); appendUserAgent(getTokenRequest, getUserAgent()); GetOpenIdTokenResult getTokenResult = cib .getOpenIdToken(getTokenRequest); if (!getTokenResult.getIdentityId().equals(getIdentityId())) { identityChanged(getTokenResult.getIdentityId()); } this.token = getTokenResult.getToken(); } return token; }