001package ca.cdr.api.model.json;
002
003import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
004import com.fasterxml.jackson.annotation.JsonProperty;
005import io.swagger.v3.oas.annotations.media.Schema;
006
007/**
008 * @deprecated Use ca.cdr.api.model.json.OpenIdTokenResponseJson
009 */
010@Schema(
011                name = "OpenIdTokenResponse",
012                description =
013                                "This object represents the response from a client-credentials request to an Identity Provider's token endpoint.")
014@JsonIgnoreProperties(ignoreUnknown = true)
015public class OpenIdTokenResponseJson implements IModelJson {
016
017        /* CHECKSTYLE.OFF: RegexpSingleLine - these properties are spec compliant and should not be changed */
018
019        /**
020         * REQUIRED
021         * The token we've requested
022         */
023        @JsonProperty("access_token")
024        private String myAccessToken;
025
026        /**
027         * REQUIRED
028         * The token type ("bearer", "mac")...
029         * We should only ever receive "bearer" (as that's all we support).
030         */
031        @JsonProperty("token_type")
032        private String myTokenType;
033
034        /**
035         * RECOMMENDED
036         * The lifetime (in seconds) of the access_token.
037         * MAy or may not be included.
038         */
039        @JsonProperty("expires_in")
040        private Long myExpiration;
041
042        /**
043         * OPTIONAL
044         * Only provided if this was a refresh_token request.
045         */
046        @JsonProperty("refresh_token")
047        private String myRefreshToken;
048
049        /* CHECKSTYLE.ON: RegexpSingleLine */
050
051        public String getAccessToken() {
052                return myAccessToken;
053        }
054
055        public void setAccessToken(String theAccessToken) {
056                myAccessToken = theAccessToken;
057        }
058
059        public String getTokenType() {
060                return myTokenType;
061        }
062
063        public void setTokenType(String theTokenType) {
064                myTokenType = theTokenType;
065        }
066
067        public Long getExpiration() {
068                return myExpiration;
069        }
070
071        public void setExpiration(Long theExpiration) {
072                myExpiration = theExpiration;
073        }
074
075        public String getRefreshToken() {
076                return myRefreshToken;
077        }
078
079        public void setRefreshToken(String theRefreshToken) {
080                myRefreshToken = theRefreshToken;
081        }
082}
083
084@Deprecated(since = "2025.11.R01", forRemoval = true)
085class OpenIdTokenResponse extends OpenIdTokenResponseJson {}