class XsuaaToken extends AbstractToken implements AccessToken {

	@Override
	public Principal getPrincipal() {
		String principalName;
		switch (getGrantType()) {
		case CLIENT_CREDENTIALS:
		case CLIENT_X509:
			principalName = String.format(UNIQUE_CLIENT_NAME_FORMAT, getClaimAsString(CLIENT_ID));
			break;
		default:
			principalName = getUniquePrincipalName(getClaimAsString(ORIGIN), getClaimAsString(USER_NAME));
			break;
		}
		return createPrincipalByName(principalName);
	}

	public  XsuaaToken(@Nonnull DecodedJwt decodedJwt);
	public  XsuaaToken(@Nonnull String accessToken);

}