All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pac4j.scribe.model.WeiboToken Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package org.pac4j.scribe.model;

import com.github.scribejava.core.model.OAuth2AccessToken;

import java.io.Serial;

/**
 * Weibo token extra.
 * 

More info at: Oauth2/access token

* * @author zhangzhenli * @since 3.1.0 */ public class WeiboToken extends OAuth2AccessToken { @Serial private static final long serialVersionUID = 1489916603771001585L; private String uid; /** *

Constructor for WeiboToken.

* * @param accessToken a {@link OAuth2AccessToken} object * @param uid a {@link String} object */ public WeiboToken(OAuth2AccessToken accessToken, String uid) { super(accessToken.getAccessToken(), accessToken.getTokenType(), accessToken.getExpiresIn(), accessToken.getRefreshToken(), accessToken.getScope(), accessToken.getRawResponse()); this.uid = uid; } /** *

Getter for the field uid.

* * @return a {@link String} object */ public String getUid() { return uid; } /** *

Setter for the field uid.

* * @param uid a {@link String} object */ public void setUid(String uid) { this.uid = uid; } /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof WeiboToken that)) return false; if (!super.equals(o)) return false; return uid != null ? uid.equals(that.uid) : that.uid == null; } /** {@inheritDoc} */ @Override public int hashCode() { var result = super.hashCode(); result = 31 * result + (uid != null ? uid.hashCode() : 0); return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy