com.symphony.bdk.app.spring.auth.model.TokenPair Maven / Gradle / Ivy
package com.symphony.bdk.app.spring.auth.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotBlank;
/**
* A pair of tokens used during the Circle of Trust authentication.
*
* @param appToken {@link AppToken} generated by the Extension App Backend.
* @param symphonyToken Symphony Token generated by the Symphony Backend.
*/
public record TokenPair(@NotBlank(message = "App Token is mandatory") String appToken,
@NotBlank(message = "Symphony Token is mandatory") String symphonyToken) {
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public TokenPair(@JsonProperty("appToken") String appToken, @JsonProperty("symphonyToken") String symphonyToken) {
this.appToken = appToken;
this.symphonyToken = symphonyToken;
}
}