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

ws.wamp.jawampa.auth.client.Ticket Maven / Gradle / Ivy

package ws.wamp.jawampa.auth.client;

import ws.wamp.jawampa.WampMessages.AuthenticateMessage;
import ws.wamp.jawampa.WampMessages.ChallengeMessage;

import com.fasterxml.jackson.databind.ObjectMapper;

public class Ticket implements ClientSideAuthentication {
	public static final String AUTH_METHOD = "ticket";
	
	private final String ticket;
	
	public Ticket(String ticket) {
		this.ticket = ticket;
	}

	@Override
	public String getAuthMethod() {
		return AUTH_METHOD;
	}

	@Override
	public AuthenticateMessage handleChallenge(ChallengeMessage message,
			ObjectMapper objectMapper) {
		return new AuthenticateMessage(ticket, objectMapper.createObjectNode());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy