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

com.sflpro.identity.api.common.dtos.auth.mechanism.TokenAuthenticationRequestDetailsDto Maven / Gradle / Ivy

package com.sflpro.identity.api.common.dtos.auth.mechanism;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.sflpro.identity.api.common.dtos.auth.AuthenticationRequestDetailsDto;
import com.sflpro.identity.core.datatypes.CredentialType;
import com.sflpro.identity.core.datatypes.TokenType;

import javax.validation.constraints.NotEmpty;

/**
 * Company: SFL LLC
 * Created on 23/12/2017
 *
 * @author Davit Harutyunyan
 */
public final class TokenAuthenticationRequestDetailsDto extends AuthenticationRequestDetailsDto {

    @NotEmpty
    private final TokenType tokenType;

    @NotEmpty
    private final String token;

    @JsonCreator
    public TokenAuthenticationRequestDetailsDto(@JsonProperty("tokenType") final TokenType tokenType,
                                                @JsonProperty("token") final String token) {
        super(CredentialType.TOKEN);
        this.tokenType = tokenType;
        this.token = token;
    }

    public TokenType getTokenType() {
        return tokenType;
    }

    public String getToken() {
        return token;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy